On Wed, 20 Jul 2016, Marcos Douglas wrote:
Hi, Is possible to get all exceptions in one place, in a CGI/FastCGI programs? I need to know the Request instance too, to treat the exception properly.
No, you cannot. You can override Application.ShowException, but then you do not know the current request. What I do is make a descendent of TFPWebModule which overrides "HandleRequest', and which handles exceptions in a generic way. It returns JSON when the request expects JSON etc. All my other modules are descendent of this descendent. Michael. _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal