Can I define custom types for user-defined exceptions in JavaScript? If so, how would I do it?
From WebReference:
throw { name: "System Error", level: "Show Stopper", message: "Error detected. Please contact the system administrator.", htmlMessage: "Error detected. Please contact the <a href="mailto:[email protected]">system administrator</a>.", toString: function(){return this.name + ": " + this.message;} };
2.1m questions
2.1m answers
60 comments
57.0k users