Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
4
Task/Exceptions/DWScript/exceptions-1.dw
Normal file
4
Task/Exceptions/DWScript/exceptions-1.dw
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
procedure Test;
|
||||
begin
|
||||
raise Exception.Create('Sample Exception');
|
||||
end;
|
||||
11
Task/Exceptions/DWScript/exceptions-2.dw
Normal file
11
Task/Exceptions/DWScript/exceptions-2.dw
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
procedure Test2;
|
||||
begin
|
||||
try
|
||||
test;
|
||||
except
|
||||
on E: Exception do begin // Filter by exception class
|
||||
PrintLn(E.Message); // Showing exception message
|
||||
raise; // Rethrowing
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
8
Task/Exceptions/DWScript/exceptions-3.dw
Normal file
8
Task/Exceptions/DWScript/exceptions-3.dw
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
procedure Test3;
|
||||
begin
|
||||
try
|
||||
test2;
|
||||
finally
|
||||
PrintLn('Test3 finally');
|
||||
end;
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue