Terminating an application

Bill Baxter dnewsgroup at billbaxter.com
Wed Sep 12 15:14:27 PDT 2007


llee wrote:
> Is it possible to terminate an application after catching an exception|error? I know how that assert will automatically terminate an application after catching an AssertError. Is there a general method for terminating an application outside of main(). Perhaps, something like exit() under linux? 

exit() is defined in std.c.stdlib.  Selective import is good to avoid 
polluting your namespace with all the other cruft in stdlib:

    import std.c.stdlib : exit;

--bb



More information about the Digitalmars-d mailing list