1. Re: crash feature request

Reviving an old thread ...

Rob wrote on 25 March 2006:

> Ryan W. Johnson wrote:
>
>> I was trying to get a program to generate ex.err AND suppress the message on
>> the screen. It doesn't seem to be possible.
>>
>> The ref manual says this:
>>
>> for crash_file():
>> <quote>
>> s may be empty, i.e. "". In this case no diagnostics or debugging information
>> will be written to either a file or the screen. s might also be "NUL" or
>> "/dev/null",
>> in which case diagnostics will be written to the screen, but the ex.err
>> information
>> will be discarded.
>> </quote>
>>
>> And for crash_message():
>> <quote>
>> By calling crash_message() you can control the message that will appear on
>> the
>> screen. Debugging information will still be stored in ex.err. You won't lose
>> any information by doing this.
>>
>> s may contain '\n', new-line characters, so your message can span several
>> lines
>> on the screen. Euphoria will switch to the top of a clear text-mode screen
>> before
>> printing your message.
>> </quote>
>>
>> My proposal is: since you can call crash_file("") to suppress ex.err, do you
>> think you could make it so that crash_message("") will just suppress the
>> message
>> on the screen? That way the error file can still be generated, but then the
>> program will just end without making a console window appear.
>>
>> I think this would be a useful option for programs that are intended to be
>> background
>> services that are never supposed to put anything on the screen.

Recently I also needed something like that.

> Yes. That was on my (big) list.
> I'll try to do it for 3.0, since it
> should be fairly easy.

Maybe I've found a workaround. I used crash_routine(), and the first
command of my function for handling fatal run-time errors is
free_console()


This seems to work fine on Windows 98 and XP, with an interpreted
program as well as one compiled with Borland. I did not even see a black
console window popping up temporarily -- or maybe my old eyes are just
too slow? blink

Regards,
   Juergen

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu