Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

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

t_formatString

Characters to be printed verbatim, intermixed with format specifications prefixed by the % sign.

g_arg1

The arguments following the format string are printed according to their corresponding format specifications.

S_message1

Message string or symbol.

S_message2

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
 ⠀
X