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;} };
1.4m articles
1.4m replys
5 comments
57.0k users