What are the standard practices for throwing Javascript 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
8:54 UTC
Read the original article
Hit count: 155
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