1. Re: crash_message

Cuny, David wrote:
>> It *might* even be possible to satisfy David's
>> needs, while avoiding the quagmire of a generic
>> crash routine ...
>
>What quagmire?

I know some of this has been hinted at before, but consider:

What happens if your error routine contains an error? Should
Euphoria then skip it and do a "standard" crash, or should
there be a hiearchy of routines (a complicated feature in
itself)? Beyond that, what's to stop you from essentially
re-running the program once your error-handling routine is
given control? In other words, if the error can be trapped
by any typical routine, without restrictions placed on it,
you could very well "carry on" as if the error never happened,
regardless of its severity.

Basically, a unrestricted, generic error routine has powerful
potential uses, but it also has all the elegance & structural
integrity of a "goto" (I can already envision a flame or two
from this one...)

That's not to say it shouldn't be implemented, just that it's
likely to be a stumbling block if it were. Looking at Pete's
situation with Linux keyboard handlers, I don't see any other
way to allow a graceful recovery; there's obviously many ways
to alter a system so that you'd need to undo the change before
exiting (not everything could be assigned to a simple
"parameter" like crash_graphics_mode().)

Perhaps "quagmire" is the wrong word. MHO is that the
implementation you described (exit immediately upon a second
crash), combined with other restrictions, would be the way to
do it. I wouldn't like it conceptually, but considering the
current state of error-handling under Euphoria, I admit that
I wouldn't hesitate to use it.


Rod

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu