webathena icon indicating copy to clipboard operation
webathena copied to clipboard

Error-handling somewhat awkward

Open davidben opened this issue 13 years ago • 0 comments

I wonder if we can do a little better here. JS already provides an Error class. The context constants probably ought to be classes (er, prototypes). Also might be good to distinguish user-level errors from internal ones. For instance, ReferenceError is probably better left uncaught. Also any ASN.1-level errors. Debug tools can then catch it and we go from there.

We can have an error type per component, and the ui.js top-level handler can whitelist a few to report to the user and re-raise the rest (reporting "oops, something broke").

davidben avatar Nov 27 '12 21:11 davidben