www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1693] New: D DLLs do not support exceptions

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1693

           Summary: D DLLs do not support exceptions
           Product: D
           Version: 1.023
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: daniel.keep+d.puremagic.com gmail.com


If an exception crosses the boundary between a DLL and its host, it causes the
program to crash out to a system dialog.  This effectively makes D-based DLLs
useless, unless you wrap every single call in try/catch.  This throws a rather
large stick in the spokes of getting Phobos into a DLL.

At a minimum, the web page on doing DLLs in D should be updated to explicitly
state this limitation.

Will attach a complete test case presently.


-- 
Nov 25 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1693






-------
Created an attachment (id=210)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=210&action=view)
Test case

Compile using build.cmd, then execute host.exe.  It should get as far as
printing "Hello, from plugin2!" before crashing.  Commenting out "throw new
Exception..." from plugin.d and recompiling causes the crash to disappear.


-- 
Nov 25 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1693


SHOO <zan77137 nifty.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zan77137 nifty.com



*** Issue 7020 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 26 2011
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1693


SHOO <zan77137 nifty.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



https://github.com/D-Programming-Language/druntime/pull/92

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 01 2011