You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exhibit has two Debugging functions, Debug.exception and Debug.warn . Exception throws an error (halting execution) while warn writes to the console if it exists and raises an alert if it does not. So it seems warn is intended for less severe errors. However, there doesn't seem to be a lot of consistency in deciding which errors are severe. For example, an error initializing a single exhibit component causes an exception to be thrown, even though all other components might initialize just fine. On the other hand, if a component has no createFromDOM method, then a warning is given (but no exception).
A clear specification of when to except and when to warn would allow us to move the code towards consistent usage.
We should also consider that when an end user is viewing the page, neither halting on exceptions nor (alert) warnings are useful to them; in such situations we should suppress warnings and also catch all errors so the user gets at least the working parts of the exhibit.
The text was updated successfully, but these errors were encountered:
Exhibit has two Debugging functions, Debug.exception and Debug.warn . Exception throws an error (halting execution) while warn writes to the console if it exists and raises an alert if it does not. So it seems warn is intended for less severe errors. However, there doesn't seem to be a lot of consistency in deciding which errors are severe. For example, an error initializing a single exhibit component causes an exception to be thrown, even though all other components might initialize just fine. On the other hand, if a component has no createFromDOM method, then a warning is given (but no exception).
A clear specification of when to except and when to warn would allow us to move the code towards consistent usage.
We should also consider that when an end user is viewing the page, neither halting on exceptions nor (alert) warnings are useful to them; in such situations we should suppress warnings and also catch all errors so the user gets at least the working parts of the exhibit.
The text was updated successfully, but these errors were encountered: