History

Improve IDB error handling for Firefox private mode

Thibaut Courouble committed 9 years ago

Commit 8b566f21 parent dcca46c2 files · +5 −0Browse files

Unified · Split

2 files
  1. assets/javascripts/app/db.coffee +2 −0
  2. assets/javascripts/templates/error_tmpl.coffee +3 −0
assets/javascripts/app/db.coffee+2−0
@@ -49,6 +49,8 @@ class app.DB · 48 unmodified lines
49 @onQuotaExceededError()49 @onQuotaExceededError()
50 when 'VersionError'50 when 'VersionError'
51 @onVersionError()51 @onVersionError()
52 when 'InvalidStateError'
53 @fail 'private_mode'
52 else54 else
53 @fail 'cant_open', error55 @fail 'cant_open', error
54 return56 return
assets/javascripts/templates/error_tmpl.coffee+3−0
@@ -33,6 +33,9 @@ app.templates.offlineError = (reason, exception) -> · 32 unmodified lines
33 when 'buggy'33 when 'buggy'
34 """ DevDocs requires IndexedDB to cache documentations for offline access.<br>34 """ DevDocs requires IndexedDB to cache documentations for offline access.<br>
35 Unfortunately your browser's implementation of IndexedDB contains bugs that prevent DevDocs from using it. """35 Unfortunately your browser's implementation of IndexedDB contains bugs that prevent DevDocs from using it. """
36 when 'private_mode'
37 """ Your browser appears to be running in private mode.<br>
38 This prevents DevDocs from caching documentations for offline access."""
36 when 'exception'39 when 'exception'
37 """ An error occured when trying to open the IndexedDB database:<br>40 """ An error occured when trying to open the IndexedDB database:<br>
38 <code class="_label">#{exception.name}: #{exception.message}</code> """41 <code class="_label">#{exception.name}: #{exception.message}</code> """

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t