if (error) { throw "Error" } if (something) { throw new MyException (errorcode, a, b) }