reddit discussion on replacing Python in 0install

Lars T. Kyllingstad public at kyllingen.net
Tue Jun 11 12:36:43 PDT 2013


On Tuesday, 11 June 2013 at 18:38:51 UTC, Andrei Alexandrescu 
wrote:
> On 6/11/13 1:01 PM, Lars T. Kyllingstad wrote:
>> As in a module destructor? Isn't it better to let the error 
>> pass
>> silently rather than throwing an exception that can't be 
>> caught?
>
> It will not be caught but will cause the entire program to 
> print a diagnostic and exit with a nonzero error code, which is 
> useful.

Then we should also provide a hook so the user has the option of 
handling it.  For example, core.exception could provide

   void setStaticDestructorExceptionHandler(
       void function(string module, Throwable t) handler);

or similar.


More information about the Digitalmars-d mailing list