[fpc-pascal] CGI, Handle Exceptions

leledumbo leledumbo_cool at yahoo.co.id
Thu Jul 21 03:40:23 CEST 2016


> 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...

> You can override Application.ShowException, but then you do not know the 
> current request. 

What was the idea behind OnShowRequestException only gets TResponse instead
of along with TRequest?



--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/CGI-Handle-Exceptions-tp5725746p5725749.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list