#1 2014-07-23 14:54:17

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

non-client-server, how to catch the raw error message of the server?

Arnaud,

I use TSQLRestClientDB, which means the client and the server are the same object.

Here is a situation, when the app's writing to a sqlite database file, suddenly the drive where the database file's located become unavailable.

When in IDE debug mode, I get ESQLite3Exception with message 'disk I/O error', and this is what I want since the exception tells what's happening.

But when running out of the IDE, I have to read the LastErrorCode and LastErrormessage of TSQLRestClientDB,and the error code is 400, and the error message is JSON string, something like {"ErrorCode": 400, "ErrorText": "Bad Request"}. Obviously, the "Bad Request" error message is too generic to understand and handle.

so my question is, how to let my try...except...end statement catch the original ESQLite3Exception exception with the message 'disk I/O error'?

Thanks!


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

Offline

#2 2014-07-25 14:50:06

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

Re: non-client-server, how to catch the raw error message of the server?

Could you please create a ticket?

Offline

#3 2014-07-25 18:50:01

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

Re: non-client-server, how to catch the raw error message of the server?

ab wrote:

Could you please create a ticket?

Done: http://synopse.info/fossil/tktview/11c1 … 2e958a59dc


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