throw
Also written: throw new Error
A statement that raises an error, such as `throw new Error("Bad quantity")`. It ends the function and any caller until a `catch` handles it.
Also written: throw new Error
A statement that raises an error, such as `throw new Error("Bad quantity")`. It ends the function and any caller until a `catch` handles it.