fail

Call this to end your program with an error message for the user, and no ugly stack trace. The error message is sent to stderr and the errorlevel is set to non-zero.

This is exception-safe, all cleanup code gets run.

Your program's name is automatically detected from $(STD_FILE thisExePath).

void
fail
(
T...
)
()

Examples

1 auto id = 3;
2 fail("You forgot to provide a destination for id #", id, "!");
3 
4 // Output:
5 // yourProgramName: ERROR: You forgot to provide a destination for id #3!

Meta