PDA

View Full Version : Trap Errors in Character Mode OOPs



Glennbo
16-Aug-2005, 04:12 PM
With top down programming, I've successfully used this syntax to
intercept and process errors with my own error handling.

ON ERROR GOSUB MY_ERROR_HANDLING_ROUTINE

How do I achieve the same in a character mode OOPs program?

I've tried with no success, using variations of the following.

Use Error

Procedure Trap_All

If Lasterr EQ "15" Begin
Send Do_My_Procedure_For_This_Error
End

End_Procedure


What am I doing wrong here?

--
_______ _____ ___ _____ ____
/ ___/ / / __/ |/ / |/ / _ )/ __ \
/ (_ / /__/ _// / / _ / /_/ /
\___/____/___/_/|_/_/|_/____/\____/
---------------------------------------------------------------------
Glennbo These go to eleven
Non-Linear Sound http://www.soundclick.com/glennbo
Hear My Music http://www.soundclick.com/jambits

Roger Loftus
17-Aug-2005, 12:02 AM
Glennbo wrote:

>
> With top down programming, I've successfully used this syntax to
> intercept and process errors with my own error handling.
>
> ON ERROR GOSUB MY_ERROR_HANDLING_ROUTINE
>
> How do I achieve the same in a character mode OOPs program?
>
> I've tried with no success, using variations of the following.
>
> Use Error
>
> Procedure Trap_All
>
> If Lasterr EQ "15" Begin
> Send Do_My_Procedure_For_This_Error
> End
>
> End_Procedure
>
>
> What am I doing wrong here?

Glennbo:

Here is a simple error handler I use that you can study.

Notice that the handler is an object, and that setting the
error_object_id to the container object forces a call to the
error_report procedure contained in the object.

In error_report, you can do pretty much as you please. Notice that my
use simply puts up warning lines for pageing beyond bof-eof without
popping up the object, and has different options for system errors
which call the error object with a ui_accept.

Using something like this model, you should be able do do most anything
you want.

Roger Loftus

Glennbo
17-Aug-2005, 11:09 AM
The entity known as Roger Loftus, posted:

Thanks Roger!

That got me going in the right direction.


> Here is a simple error handler I use that you can study.
>
> Notice that the handler is an object, and that setting the
> error_object_id to the container object forces a call to the
> error_report procedure contained in the object.
>
> In error_report, you can do pretty much as you please. Notice that my
> use simply puts up warning lines for pageing beyond bof-eof without
> popping up the object, and has different options for system errors
> which call the error object with a ui_accept.
>
> Using something like this model, you should be able do do most anything
> you want.


--
_______ _____ ___ _____ ____
/ ___/ / / __/ |/ / |/ / _ )/ __ \
/ (_ / /__/ _// / / _ / /_/ /
\___/____/___/_/|_/_/|_/____/\____/
---------------------------------------------------------------------
Glennbo These go to eleven
Non-Linear Sound http://www.soundclick.com/glennbo
Hear My Music http://www.soundclick.com/jambits

David
3-Jan-2006, 04:12 PM
You seem to be the right one to ask...

Can YOU trap unconverted dates, console or VDF, so they can be fixed or
zeroed before the run-time fatal errors out on them?

David

"Roger Loftus" <rloftus@plantingstock.com> wrote in message
news:QxNJijuoFHA.1716@dacmail.dataaccess.com...
> Glennbo wrote:
>
>>
>> With top down programming, I've successfully used this syntax to
>> intercept and process errors with my own error handling.
>>
>> ON ERROR GOSUB MY_ERROR_HANDLING_ROUTINE
>>
>> How do I achieve the same in a character mode OOPs program?
>>
>> I've tried with no success, using variations of the following.
>>
>> Use Error
>>
>> Procedure Trap_All
>>
>> If Lasterr EQ "15" Begin
>> Send Do_My_Procedure_For_This_Error
>> End
>>
>> End_Procedure
>>
>>
>> What am I doing wrong here?
>
> Glennbo:
>
> Here is a simple error handler I use that you can study.
>
> Notice that the handler is an object, and that setting the
> error_object_id to the container object forces a call to the
> error_report procedure contained in the object.
>
> In error_report, you can do pretty much as you please. Notice that my
> use simply puts up warning lines for pageing beyond bof-eof without
> popping up the object, and has different options for system errors
> which call the error object with a ui_accept.
>
> Using something like this model, you should be able do do most anything
> you want.
>
> Roger Loftus
>
>