A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
13
Task/Flow-control-structures/D/flow-control-structures-3.d
Normal file
13
Task/Flow-control-structures/D/flow-control-structures-3.d
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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.");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue