Function Reference

Errors and Warnings

Handling Errors

error
Format the optional arguments under the control of the template string TEMPLATE using the same rules as the `printf' family of functions (*note Formatted Output::) and print the resulting message on t
print_usage
Print the usage message for a function.
usage
Print the message MSG, prefixed by the string `usage: ', and set Octave's internal error state such that control will return to the top level without evaluating any more commands.
beep
Produce a beep from the speaker (or visual bell).
beep_on_error
Query or set the internal variable that controls whether Octave will try to ring the terminal bell before printing an error message.
lasterror
Returns or sets the last error message.
lasterr
Without any arguments, return the last error message.
rethrow
Reissues a previous error as defined by ERR.
errno
Return the current value of the system-dependent variable errno, set its value to VAL and return the previous value, or return the named error code given NAME as a character string, or -1 if NAME is n
errno_list
Return a structure containing the system-dependent errno values.

Handling Warnings

warning
Format the optional arguments under the control of the template string TEMPLATE using the same rules as the `printf' family of functions (*note Formatted Output::) and print the resulting message on t
lastwarn
Without any arguments, return the last warning message.
warning_ids
`Octave:array-to-scalar' If the `Octave:array-to-scalar' warning is enabled, Octave will warn when an implicit conversion from an array to a scalar value is attempted.