Javier,

In the past, when we could not selectively turn off non-critical errors, this 
command was almost totally useless (to me anyway, perhaps not to all) 
But now it seem to be a perfect solution in certain specific scenarios.  Too 
bad I can't use it in a report EEP.

This code does exactly what I want it to do, ignoring the first syntax error 
and catching the second.
-----------------------------------------------------------------
ON ERROR GOTO BooBoo

set error message 40 off
x --deliberate error
set error message 40 on

x --deliberate error

GOTO Done

LABEL BooBoo
PAUSE 1 USING 'BooBoo.'

LABEL Done
ON ERROR RESET
RETURN
------------------------------------------------------------

Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Javier Valencia
Sent: Friday, March 14, 2014 10:55 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: ON ERROR problem

Dennis,

What you are doing is exactly what I was trying to do without luck. Not a
lot of documentation on the command, and a quick search of past posts all
the way to 2002 did not bring anything useful; looks like it is not used
much.

A  FTE article on the subject might be nice.

Javier,

Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dennis
McGrath
Sent: Friday, March 14, 2014 10:46 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: ON ERROR problem

Javier,  

I use those all the time.

But, In the case of a report that does a lot of preparation in the Before
Generate action, I thought I might avoid testing after every command.

It would be so elegant to have the code look like this:
---------------------------------------------------------------------
ON ERROR GOTO BooBoo

--Preparation code here

GOTO Done

Label BooBoo
Pause 1 using 'Report Generation Failed. Try Again.'
PROPERTY REPORT CANCEL 'TRUE'

Label Done
ON ERROR RESET
RETURN
---------------------------------------------------------------------


Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]
From: [email protected] [mailto:[email protected]] On Behalf Of Javier
Valencia
Sent: Friday, March 14, 2014 10:35 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: ON ERROR problem

Dennis,

The ON ERROR command is one that I never got to work. I understand the
concept every time I tried implementing it  I run into problems
implementing, so I used a workaround thinking that I would look at it later
but never quite did.
Have you tried using the SET ERROR VAR command or the SQLCODE? These are the
ones I use to capture and process errors.

Javier,

Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137

From: [email protected] [mailto:[email protected]] On Behalf Of Dennis
McGrath
Sent: Friday, March 14, 2014 9:19 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - ON ERROR problem

I'm trying to use this command at the top of a report Before Generate
action.
ON ERROR GOTO BooBoo

I get Illegal command in Entry Exit procedure.

Any blues clues?
I thought this would be a great way to handle report start errors elegantly.

Dennis McGrath
Software Developer
QMI Security Solutions
1661 Glenlake Ave
Itasca IL 60143
630-980-8461
[email protected]


Reply via email to