import std.asserterror; int main() { try { whatever(); } catch(AssertError) { printf("Whoa! Hold on there. An assertion failed.\n\n"); } finally { printf("This would happen after the errors are dealt with (if there are any errors).\n\n"); } printf("If something happened, it wasn't enought of a problem to end the program.\n\n"); return 0; } void whatever() { assert(0); /* comment out this line to see what happens if no error occurs */ }