Re: Forms 5.0 Error Trapping

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 26 Apr 1999 16:35:58 GMT
Message-ID: <7g24le$2et$1_at_nntp.csufresno.edu>


In article <924791528.314.69_at_news.remarQ.com>, Ken Halsted <kenman_at_mail.snider.net> wrote:
>I was wondering how is the correct way to Trap errors in Forms 5. I know
>you can use an ON-ERROR trigger on the block involved, but in the trigger
>itself, how do you trap specific FRM-XXXX error messages.
>
>I want to print a nice message box on the screen with a user-informative
>message instead of just seeing the normal Forms error. Also, how do I get a
>message box to appear. Usually I do something like the following:
>
>IF ERROR_NUMBER = (WHATEVER) THEN
> MESSAGE('TESTING'); MESSAGE(' '); SYNCHRONIZE;
> RAISE FORM_TRIGGER_FAILURE;
>
>Is there a better way?

Issuing an alert is the standard method to use for a pop-up message, but I use your stacked message command method all the time -- it takes less coding. BTW, you don't need the Synchronize command. Also, for the second message command, I add the No_Acknowledge parameter.

As for the FRM-xxxx messages, there is no other way to trap them. You MUST use an on-error trigger. But a properly working form should not run into those error messages, usually. You can write code to watch out for the condition causing the error before the actual event occurs. By the way, it would help if you would identify the type of error are you getting.

Steve Cosner
http://members.aol.com/stevec5088 Received on Mon Apr 26 1999 - 18:35:58 CEST

Original text of this message