checkError

Synopsis

$ checkError([$error])

Returns the last error message to occur.

Parameters

$error - a scalar to place the last error object into. Often times this error object will be an instance of a java.lang.Exception.

Returns

The last error object. The same one placed into the $error parameter.

Side Effects / Notes

Examples

$handle = openf(">/etc/shadow"); if (checkError($error)) { warn("Could not open the file: $error"); }

Warning: Could not open the file: java.io.FileNotFoundException: /etc/shadow (Permission denied) at checkError.sl:5

See Also