Can't catch Phobos exceptions

Demetri Supernova2003dh at yahoo.com
Tue Apr 1 13:22:53 PDT 2014


On Tuesday, 18 March 2014 at 09:21:05 UTC, Iain Buclaw wrote:
> On 18 March 2014 01:20, Demetri <Supernova2003dh at yahoo.com> 
> wrote:
>> On Monday, 17 March 2014 at 18:52:49 UTC, Johannes Pfau wrote:
>>>
>>> Am Mon, 17 Mar 2014 18:13:36 +0000
>>> schrieb "Demetri" <Supernova2003dh at yahoo.com>:
>>>
>>>> I wrote a small D program. When compiled with DMD, it works 
>>>> fine, but
>>>> neither GDC nor LDC2 can catch exceptions thrown from Phobos 
>>>> (proven by
>>>> GDB). How do I fix this?
>>>>
>>>> Example code:
>>>>
>>>>      import std.process;
>>>>      void main(){
>>>>        try
>>>>        {
>>>>          spawnProcess(["/dev/null"]);
>>>>        }
>>>>        catch (Throwable p)
>>>>        {
>>>>          return;
>>>>        }
>>>>      }
>>>>
>>>
>>> The example works fine here (with exactly the same 
>>> parameters).
>>> Do you have a recent GDC? 32bit/64bit?
>>
>> What does gdc -v show on your system? That may help.
>
> On my work system, the last time I built gdc was around 
> 2014/02/21.
>
> I cannot reproduce this.

Sorry everyone!

The problem was one on my end that was causing all sorts of 
things to crash. Not being able to catch Phobos exceptions was 
just the first sign.


More information about the D.gnu mailing list