If an error occurs, catch will return a description of the error. The description of the error has the following format:catch { statements }
If no error occurs, catch will return zero. You may emulate your own errors using the function throw, described in chapter 16 "Builtin functions".({
"error description",
backtrace()
})
Example:
int x,y;
// This might generate "division by zero"
mixed error=catch { x/=y; };