javascript
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};
javascript
//"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};