[Issue 10964] New: [REG][2.063] Static array assign/blit exception slips through catch block.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 4 14:00:11 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10964
Summary: [REG][2.063] Static array assign/blit exception slips
through catch block.
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 2013-09-04 14:00:09 PDT ---
Regression in 2.062 => 2.063
Basically, when a you assign to a static array (and it postblits elements), if
an exception is thrown, it is not caught by "catch(Exception)". It *is* caught
by "catch(Throwable)" though, yet not by "catch("Error")".
//----
import std.stdio;
struct S
{
this(this)
{
throw new Exception("BOOM!");
}
}
void main()
{
S s;
S[1] ss;
writeln("s = s");
try
{
s = s;
}
catch(Exception e)
writeln("caught in Exception");
catch(Error e)
writeln("caught in Error");
catch(Throwable e)
writeln("caught in Throwable");
writeln("ss = s");
try
{
ss = s;
}
catch(Exception e)
writeln("caught in Exception");
catch(Error e)
writeln("caught in Error");
catch(Throwable e)
writeln("caught in Throwable");
writeln("ss = ss");
try
{
ss = ss;
}
catch(Exception e)
writeln("caught in Exception");
catch(Error e)
writeln("caught in Error");
catch(Throwable e)
writeln("caught in Throwable");
}
//----
2.062:
s = s
caught in Exception
ss = s
caught in Exception
ss = ss
caught in Exception
2.063:
s = s
caught in Exception
ss = s
caught in Throwable
ss = ss
caught in Throwable
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list