Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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>."
- }
- function MyError(message) {
- this.message = message;
- }
- MyError.prototype = new Error;
- function MyError(message) {
- this.message = message;
- }
- MyError.prototype = new Error;
- function MyError(message) {
- this.message = message;
- }
- MyError.prototype = new Error;
- try {
- something();
- } catch(e) {
- if(e instanceof MyError)
- doSomethingElse();
- else if(e instanceof Error)
- andNowForSomethingCompletelyDifferent();
- }
Add Comment
Please, Sign In to add comment