Function 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 thisExePath
.
Prototype
void fail(T...)(
T args
);
Example
auto id = 3;
fail("You forgot to provide a destination for id #", id, "!");
// Output:
// yourProgramName: ERROR: You forgot to provide a destination for id #3!
Authors
Nick Sabalausky
Copyright
Copyright (C) 2014-2017 Nick Sabalausky