Re: ? 0/1 to throw an error?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jeremy Cowgar wrote:
> 
> I've seen this many times. Here's an example:
> 
> }}}
<eucode>
> if bad = 1 then
>     printf(1, "bad stuff here, cause a crash")
>     ? 0/1
> end if
> </eucode>
{{{


This is sloppy programming, but useful since there is no other way to 
generate an ex.err file.  It would be better to simply change abort() to
spit out ex.err when it sees a negative integer, and flip the sign for the
exit code.

> Can we have an internal function that triggers a crash with a legitimate error
> message?

Euphoria already has crash_message.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu