RosettaCodeData/Task/Flow-control-structures/D/flow-control-structures-3.d
2023-07-01 13:44:08 -04:00

13 lines
276 B
D

import std.stdio;
void main(string[] args) {
scope(exit)
writeln("Gone");
if (args[1] == "throw")
throw new Exception("message");
scope(exit)
writeln("Gone, but we passed the first" ~
" chance to throw an exception.");
}