error
error(t_formatString[g_arg1... ] )
error [S_message1[S_message2] ... ] ) => none
Description
Prints error messages and calls err.
Prints the S_message1 and S_message2 error messages if they are given and then calls err, causing an error. The first argument can be a format string, which causes the rest of the arguments to be printed in that format.
Arguments
|
More message strings or symbols. More than two arguments should be given only if the first argument is a format string. |
Value Returned
Prints the S_message1 and S_message2 error messages if they are given and then calls err, causing an error. error never returns.
Examples
Prints *Error* myFunc: Bad List
error( "myFunc" "Bad List")
Prints *Error* bad args - name 100 (1 2 3)
error( "bad args - %s %d %L" "name" 100 '(1 2 3) )
Prints out *Error* test and returns nil.
errset( error( "test" ) t) => nil
Related Topics
Function and Program Structure
Return to top