May 15, 2010

Throw error

//"throw" is not limited just throwing Error, basically, you can throw anything.

//but normally, you are supposed to 

throw new Error(reason);
//or
throw {name: exceptionName, message:reason};