[fpc-pascal] CGI, Handle Exceptions

Marcos Douglas md at delfire.net
Thu Jul 21 19:46:45 CEST 2016


On Wed, Jul 20, 2016 at 10:40 PM, leledumbo <leledumbo_cool at yahoo.co.id> wrote:
>
> > I need to know the Request instance too, to treat the exception properly.
>
> As Michael has pointed out, the current design has no access to the TRequest
> instance. My alternative solution would be to create descendant Exception
> class that has Request property. For every exception you raise deliberately,
> use this class. But you know this is limited to such an exception only...

But some exceptions I don't have control (exceptions, of course).
I will always need the context to any exception. So, Michael tip is
simple to implement  to have full control of exceptions.

Regards,
Marcos Douglas



More information about the fpc-pascal mailing list