-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught error if 'start_documents_uri' not defined in prefs #279
Comments
This does not result in any malfunction but just doesn’t seem right and bad style. |
Apparently it is sufficient if the prefs file contains an empty entry in the form: <entry key="start_documents_uri" value=""/> |
So this is where it may happen that the warning is thrown if there is no entry in the prefs file for What do you think @bwbohl - is there something to fix or a better way to handle things is the entry is not there? |
I think if we add a check (probably in in (2)), wheter the return value of |
Where and when is the error message thrown anyway? :-) Can there be an additional parameter here? - https://github.com/Edirom/Edirom-Online/blob/develop/app/Application.js#L185 So that becomes The definition of getPreference looks like that - https://github.com/Edirom/Edirom-Online/blob/develop/app/controller/PreferenceController.js#L64 Would test that if I knew how to throw the error... |
If you lad an edirom online and the edition has not defined a value for key Edirom-Online/app/controller/PreferenceController.js Lines 64 to 94 in aadb46b
to be exact: Edirom-Online/app/controller/PreferenceController.js Lines 83 to 88 in aadb46b
The error can be observed in the Developer Tools JS console of your browser. |
This is not a critical issue, as you can see from the error level in line 87 which is set to warn. But I think it’s nicer to catch it before an warning is raised, e.g. by avoiding the execution if the preferences key is an empty string or null |
app.js:1 Uncaught constructor {msg: 'No preference found with this key', key: 'start_documents_uri', level: 'warn', sourceMethod: 'getPreference', sourceClass: 'EdiromOnline.controller.PreferenceController', …}
The text was updated successfully, but these errors were encountered: