On 27/11/2019 06:55, cartland wrote: > On Wednesday, 27 November 2019 at 05:43:33 UTC, Mike Parker wrote: >> On Wednesday, 27 November 2019 at 05:15:10 UTC, cartland wrote: >> *snip* >> >> dmd -m32mscoff -debug -g x.d >> >> And see what happens. > > No difference between "dmd -m32mscoff -debug -g x.d" and "dmd -m32mscoff > x.d" > > -------- > C:\tmp\x>dmd -m32mscoff -debug -g x.d > > C:\tmp\x>x > hello > > C:\tmp\x>dmd x.d > > C:\tmp\x>x > hello > finally > catch first > done > ---------- > > x.d contents > -------- > import std.stdio; > void main() { > writeln("hello"); > try { > try { > throw new Exception("first"); > } finally{ > writeln("finally"); > throw new Exception("second"); > } > } catch (Exception e) { > writeln("catch ", e.msg); > } > writeln("done"); > } > ----------- > In a debugger, I get: Unhandled exception at 0x004010EF in x.exe: 0xC00001A5: An invalid exception handler routine has been detected (parameters: 0x00000001). This seems to happen when lld is used instead of the Microsoft linker. Maybe related: https://bugs.llvm.org/show_bug.cgi?id=42221 Using lld from LLVM 9 spits out errors "not compatible with SEH", but links using /SAFESEH:NO. The resulting executable then works. I have created an issue: https://issues.dlang.org/show_bug.cgi?id=20421
Re: Exceptions on Windows being "swallowed"
Rainer Schuetze via Digitalmars-d-learn Tue, 26 Nov 2019 23:15:33 -0800
- Exceptions on Windows being "... cartland via Digitalmars-d-learn
- Re: Exceptions on Windows bei... Mike Parker via Digitalmars-d-learn
- Re: Exceptions on Windows... cartland via Digitalmars-d-learn
- Re: Exceptions on Win... cartland via Digitalmars-d-learn
- Re: Exceptions on Win... Mike Parker via Digitalmars-d-learn
- Re: Exceptions on... cartland via Digitalmars-d-learn
- Re: Exceptio... Rainer Schuetze via Digitalmars-d-learn
- Re: Exceptions on Windows bei... DanielG via Digitalmars-d-learn