1. Euphoria error msg

>> I am developing a program that will be widely distributed.
>> If the interpreter(?) discovers an error, it displays an error
>> message telling the user that the source program is over 300 lines
>Someone else brought this up just before v1.4 was released, so I didn't
>have time to deal with it. I think what I'll do unless someone can
>suggest a better idea, is to add a library routine that you can
>call that will establish the message to be displayed if a run-time
>error occurs. This would be done for v1.4a which might be out in a few
>weeks or so. You might call this routine more than once in your program
>if (say) you want to change the message based on your program having completed
>at least part of it's task. This routine may be helpful to those who are
>over 300 statements but are trying to avoid registering, but that's ok I guess
> smile

Good idea, but not quite the right spin.  I am developing the program
in Euphoria.  My version of Euphoria *is* registered.  I am binding
my pgm and distributing it to people who are not programmers,
and have no desire to become programmers.  When I bind the program,
the P.D. version of Euphoria is attached to the binary.

When users of my program experience an error in my program, they
get the message that tells them they can insert print statements
or buy the complete edition of Euphoria.  Of course, they have no idea
what a Euphoria programming language is, they don't want the complete
edition, & it would not help them solve the problem in my program.

As a Euphoria user, I could not tell that Euphoria was developed
in Watcom C.  (I am sure there are finger prints if I knew where
to look for them.)  I don't get error msgs from Watcom, if Euphoria
is broke, I don't go to Watcom for support...

I would prefer that Euphoria would provide something like PL/1's
ON ERROR structure.  The syntax is something like


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

Thanks for the consideration,

John Kinne

new topic     » topic index » view message » categorize

2. Euphoria error msg

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 message » categorize


Quick Links

User menu

Not signed in.

Misc Menu