Sorry if I just did not figure it out, I work with Zeoslib relatively short time.
Can you tell me, please, is it possible to return all the error messages from the Firebird, when an error occurs, and not just a one element from FB status vector?
If there is no such feature, is it possible to implement it?
For example, a such error occurs:
Code: Select all
Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements.
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
SQLCODE: -902
SQLSTATE: 28000
GDSCODE: 225544472
Code: Select all
Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements
Code: -902 Message: Connect to "localhost/3050:Test.db" as user "TEST_APPSRV".
Fragment of code from the ZDbcFirebird module:
Code: Select all
if FAttachment = nil then begin
PrepareDPB;
FLogMessage := Format(SConnect2AsUser, [ConnectionString, URL.UserName]);;
FAttachment := FProvider.attachDatabase(FStatus, @FByteBuffer[0], Length(DPB), Pointer(DPB));
vvvvv
if ((Fstatus.getState and {$IFDEF WITH_CLASS_CONST}IStatus.STATE_ERRORS{$ELSE}IStatus_STATE_ERRORS{$ENDIF}) <> 0) then
HandleErrorOrWarning(lcConnect, PARRAY_ISC_STATUS(FStatus.getErrors),
FLogMessage, IImmediatelyReleasable(FWeakImmediatRelPtr));
^^^^^
{ Logging connection action }
if DriverManager.HasLoggingListener then
DriverManager.LogMessage(lcConnect, URL.Protocol, FLogMessage);
end;
Now I am developing an application using ZeosLib and mORMot2, and to the client is returned such an error:
Code: Select all
{
"errorCode":500,
"error":
{"EZIBSQLException":
{
"ClassName": "EZIBSQLException",
"Address": "7ffff5e9e000",
"Message": "SQL Error: Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements \nCode: -902 Message: Connect to \"localhost/3050:Test.db\" as user \"TEST_APPSRV\""
}}
And more detailed information is not saved even into the log...