Improve IDB error handling for Firefox private mode

pull/602/merge
Thibaut Courouble 8 years ago
parent dcca46cd0f
commit 8b566f205b

@ -49,6 +49,8 @@ class app.DB
@onQuotaExceededError() @onQuotaExceededError()
when 'VersionError' when 'VersionError'
@onVersionError() @onVersionError()
when 'InvalidStateError'
@fail 'private_mode'
else else
@fail 'cant_open', error @fail 'cant_open', error
return return

@ -33,6 +33,9 @@ app.templates.offlineError = (reason, exception) ->
when 'buggy' when 'buggy'
""" DevDocs requires IndexedDB to cache documentations for offline access.<br> """ DevDocs requires IndexedDB to cache documentations for offline access.<br>
Unfortunately your browser's implementation of IndexedDB contains bugs that prevent DevDocs from using it. """ Unfortunately your browser's implementation of IndexedDB contains bugs that prevent DevDocs from using it. """
when 'private_mode'
""" Your browser appears to be running in private mode.<br>
This prevents DevDocs from caching documentations for offline access."""
when 'exception' when 'exception'
""" An error occured when trying to open the IndexedDB database:<br> """ An error occured when trying to open the IndexedDB database:<br>
<code class="_label">#{exception.name}: #{exception.message}</code> """ <code class="_label">#{exception.name}: #{exception.message}</code> """

Loading…
Cancel
Save