xenophobia Posted September 29, 2009 Share Posted September 29, 2009 Hi guys, as far as I know, to throw an exception, you put something like this: throw "Something is not right!"; can I do something like this? throw new MyException(); Quote Link to comment Share on other sites More sharing options...
xenophobia Posted September 29, 2009 Author Share Posted September 29, 2009 What you think about something like this: throw "{'exception':'RuntimeException', 'message':'Failed!', 'code':500}"; on the catch statement: catch (ex) { var exception = JSON.parse(ex); } Haha which is kinda stupid... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.