What are the standard practices for throwing JavasScript Exceptions?

Posted by T.R. on Stack Overflow See other posts from Stack Overflow or by T.R.
Published on 2010-05-13T08:50:04Z Indexed on 2010/05/13 10:34 UTC
Read the original article Hit count: 121

w3schools says that exceptions can be strings, integers, booleans, or objects, but the example given doesn't strike me as good practice, since exception type checking is done through string comparison. Is this the preferred method of exception handling in JavaScript? Are there built-in exception types (like NullPointerException)? (if so, what are they, what kind of inheritance do they use, and are they preferred over other options?)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about exception