TempleOSTS_140317.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:02 +02:00
1 parent 2d2a65d572
commit 7ef616a20e
1416 files changed
+223873 -53917

No files matched your search

+48
View File
@@ -0,0 +1,48 @@
//$BK,1$WARNING:$BK,0$ Don't return out of a catch{}. This
//might get fixed.
//You can use $LK,"PutExcept",A="MN:PutExcept"$() in a catch statement
//and it will report args.
Bool Pmt(I64 i)
{
"%d ",i;
return YorN;
}
U0 D1()
{
"D1\n";
if (Pmt(1)) throw('Point1');
if (Pmt(2)) throw('Point2');
}
U0 D2()
{
"D2\n";
try {
D1;
if (Pmt(4)) throw('Point4');
} catch {
"D2 handler\n"
"Ch:%c:%P\n",Fs->except_ch,Fs->except_caller1;
if (Fs->except_ch=='Point1') {
"Caught in D2\n";
Fs->catch_except=TRUE;
}
}
}
U0 Demo()
{
try {
D2;
if (Pmt(3)) throw('Point3');
} catch {
"Demo handler\n"
"Ch:%c:%P\n",Fs->except_ch,Fs->except_caller1;
Fs->catch_except=TRUE;
}
}
Demo;