RosettaCodeData/Task/Flow-control-structures/D/flow-control-structures-3.d
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07: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.");
}