You’re better off using Exceptions
My problem with exceptions isn't so much exceptions themselves but the way they're used.<p>The way I see it, exceptions should only be used for things that are irreconcilable, which most of the time is interpreter errors(e.g. undefined is not a function).  In other words, I don't think it's that common that custom exceptions are needed outside of assertions to prevent the developer from doing something stupid.  If you aren't using types, raising an exception can be helpful to provide feedback and useful information when data isn't formatted correctly.<p>Exceptions suck when they're used for problems that aren't actual problems.  For example, if a query is made to an API for a record and that record isn't found, the SDK wrapping that API would raise a "Record not found" exception.  What the hell?  A record not being found is a <i>normal</i> thing!  I've seen this kind of thing all over the place, and I recently had to write some application code to work around one of these useless exceptions.  They literally tell you nothing and there's no way to solve them without catching/rescuing them.  A null value, a plain "error" object, or an error argument in a callback would have been sufficient.  If I need an exception to be raised for this kind of thing, I'll do it myself.