> I normally do the following.... Adds more code but with templates it does
> not add much time to doing a procedure and the payback is in the fact that
> you know where the exception happened exactly.....
>
>
////////////////////////////////////////////////////////////////////////////
> ////
> // PURPOSE:
> const
>      PROC_NAME = 'The ProcName';
>      ERR_MSG = 'The Error Message';
> begin
>      try
>
>      except
>        on E : Exception do
>           Handle_AppExceptions(UNIT_NAME, PROC_NAME, ERR_MSG, E.Message,
>                                SystemSettings.ViewForComposite);
>      end;
> end;
>
> I have a const of UNIT_NAME declared per unit and then my generic
> Handle_AppExceptions basically does some string formatting and then
displays
> a customised error dialog. (The last paramater basically controls font
size
> as write apps that also run on composite monitors) I also set
> Application.OnException to point to a procedure that basically supplies
> 'Unknown' for the Handle_AppExceptions params so that I know that it was
an
> unhandled exception...... HTH's

This was a request in the delphi wish list compiled by this group a few
months
ago... It's also a feature (ANSI?) of some C/C++ compilers....

Sys:/> Mount HighHorse:
 the list was compiled just prior to D5 being released so there was no
oportunity for borland to implement any of the requests but many of them
seem
so obvious and were voted for by many people that it seems reasonable to
expect that a few would have been picked up by Borland... That said maybe if
the list is suitably formatted and enough expression of interest by
developers is
made then those popular items would be adopted...
Highhorse:/> Dismount HighHorse:

;)

--
Aaron@home


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to