Euphoria error msg

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

On June 22, John Kinne said:
> I would prefer that Euphoria would provide something like PL/1's
> ON ERROR structure.  The syntax is something like
>    ...
>    ...
>    END;

> In the event of an error, the last executed ON ERROR gets control.

I don't plan on putting exception handling into the language, at least not
in the forseeable future.

I realize there are a few problems here for registered users.
First, they currently can't control the message that pops out when
an error occurs. Second, if a program they are distributing is over
300 statements there will not be any ex.err file produced. Third,
even if an ex.err file is produced, from a bound or shrouded program, it is
tedious (but not impossible) to relate the error back to the original
source. Fourth, they can't regain control after an error happens.

For the first problem, I could as I said earlier, add a library routine
that would let you override the undesirable message that comes out now
with your own message.

For the second problem, I might be able to provide a special bind
program for registered users only, that would let you choose whether an ex.err
file should or should not be generated for a given program (regardless of statem
ent count).
I need to ensure however that registered users are not distributing thousands of
 copies of ex.exe
in their bound programs such that it can be easily extracted and used
by non-registered people to debug their >300 statement programs.
I wish that I didn't have to have any limits, but people need some incentive to

For the third problem, I could (optionally) generate from the bind program a lis
ting file showing
your original source code interleaved with the shrouded code. The shrouded code
would have
line numbers beside it so if someone reports an error out in "the field" you cou
ld quickly
figure out where in the real source it was failing.

The fourth problem can be partially addressed today by invoking your .exe file f
rom a .bat file.
When a Euphoria program fails, Euphoria returns an exit code of 1 that a .bat fi
can detect using the errorlevel feature. Normally Euphoria returns a 0 errorleve
l code.
(I don't think this was ever documented anywhere - I'll add it.)

If anyone has any further ideas on this, please post them.
    Rob Craig
    Rapid Deployment Software

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


Quick Links

User menu

Not signed in.

Misc Menu