SQLFORMS ERROR HANDLING

From: Simon Rear <simon.rear_at_almac.co.uk>
Date: 27 Feb 93 13:09:00 GMT
Message-ID: <639.493.uupcb_at_almac.co.uk>


Hi,

I'm still in the process of mastering SQL Forms V3 and trying to devise the most practical approach to error handling. Perhaps you could offer me your views and solutions.

The errors i'm referring to are the oracle/forms type errors ie duplicate key value, insufficient privileges etc.

The methods I see of error handling are;

  1. Let the oracle database and forms do the work, ie messages like
    'unable to insert record' will be displayed. This approach is easier to
    code and maintain although it's not as user friendly as 'This code already exists'.
  2. Use a global on-error trigger, referenced by all forms, to trap such errors and translate them into something more meaningful to the user. This approach appealed to me at first but in practice I found it hard to differentiate between errors. For example a 'duplicate key in index' and
    'insufficient privilege' etc appear to the on-error trigger as one error
    code, ie FRM-40508, (when inserting a record).
  3. Within the forms triggers using exceptions and the exception_init pragma trap and respond to the various error messages. This would produce a more user friendly application but on the other hand would require more code to write and maintain.

I appreciate allowing for every eventuality is perhaps impractical but I believe applications must be as user friendly as possible. In turn this has to be balanced with the amount of code, time and expense invested into the application and the more generic the solution the better.

Any comments appreciated.

Thanks

Simon.Rear_at_Almac.Co.Uk

---
 . SPEED 1.20 [NR] . Your never a loser until you quit trying
         
Received on Sat Feb 27 1993 - 14:09:00 CET

Original text of this message