Re: crash feature request
Juergen Luethje wrote:
> Ooops ... I'm sorry.
> Since I want my program to return an exit status code to the operating
> system it also uses abort(), but previously I just didn't notice that
> abort() plays a role in this context. Please try this:
>
> }}}
<eucode>
> include dll.e
> include machine.e
>
> constant FATAL_ERROR = 3 -- exit status code
>
> without warning
>
> function bad()
> free_console()
> abort(FATAL_ERROR)
> return 0
> end function
>
> crash_routine(routine_id("bad"))
>
> ? 1/0
> </eucode>
{{{
>
> Now I also tested this on a Virtual Machine (which is considerably
> slower than the real machine), and there I saw a console window popping
> up temporarily.
Yes, on my Pentium-4 machine the above produces a console
window for a tiny fraction of a second. It disappears
so fast you have to try it a few times to confirm what it is.
If someone wants to eliminate the console window entirely
when crash_message("") or free_console() is specified,
feel free. As I recall, the logic in this area is a bit complicated.
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com
|
Not Categorized, Please Help
|
|