#1 2015-07-28 08:19:07

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Can we get notified once LastErrorMessage is set?

Hi Arnaud,

Can we either assign an event handler to, or override a method for TSQLRestClientURI, that gets called once LastErrorCode, LastErrorMessage or LastErrorException is set.

The requirement is that I need a centralized place to handle all the errors received from the server, instead of having all error-handling logic scattered around the entire application, something like the try...except block does. Thanks.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2015-07-28 15:15:12

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,666
Website

Re: Can we get notified once LastErrorMessage is set?

Could you please create a feature request ticket?
With a link to this forum thread.

Thanks!

Offline

#3 2015-07-29 13:03:11

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: Can we get notified once LastErrorMessage is set?


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#4 2016-01-23 23:13:02

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,666
Website

Re: Can we get notified once LastErrorMessage is set?

For the client side, I've added the TSQLRestClientURI.OnFailed centralized event.
See http://synopse.info/fossil/info/7c647a49d6

Sorry for the delay!

Offline

#5 2016-01-24 04:17:11

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: Can we get notified once LastErrorMessage is set?

Great! Thanks Arnaud!


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB