# throw {#throw}

**Parent topic:**[Programming Statements](../../Programming/ProgrammingStatements/programming_statements.md)

## Syntax {#syntax}

throw \[exceptionType\], obj

## Arguments {#arguments}

**obj** is a string

## Details {#details}

Raise a user-defined exception.

## Examples {#examples}

```
try {if (1%2 == 1) throw "it is an odd"} catch(ex){print ex};
// outpu: "USER" : "it is an odd"

ex;
// output: "USER" : "it is an odd"
```

