crash

Definition: crash(string fmt, object data={})
Description: Crash the running program, displaying a formatted error message the way printf() does.

fmt: the message text, optionally with format specifiers as per sprintf.
data: an object, defaulted to {}, as per sprintf.
Comments: The actual message shown, both on the standard error console and in ex.err[or as specified via crash_file()], is sprintf(fmt, data).

The program terminates as for any runtime error.
Example:
if fn=-1 then
    crash("cannot open config file")
end if
See Also: printf, sprintf, crash_file, crash_message