Next: Loops, Up: Directives [Contents][Index]
This directive causes xenv
to report a fatal error. Rest of
the line following the whitespace after ‘$$error’ is used as the
error message. Notice, that there’s no need to quote the message. E.g.:
$$error Something wrong happened
Processing resumes after the $$error
directive. At the end of
input, xenv
exits with the code 65, unless exit code is
altered by another error (see Exit codes).
Report a warning. Rest of the line following ‘$$warning’ and whitespace after it is used as the message text. Exit code is not altered. Processing resumes at the next line.
Exit immediately with status n. If n is omitted, exit code is determined by usual rules. For example, if you want to emit an error message and stop further processing immediately, use:
$$error Unrecoverable error $$exit
The exit status will be 65. Otherwise, if you want to exit with status 1:
$$error Unrecoverable error $$exit 1