mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 17:23:03 +01:00
Print ON DISCONNECT trigger exceptions (including cancelling) to trace if log_errors = true
This commit is contained in:
parent
fc85f89be4
commit
ddec610a08
@ -8216,6 +8216,17 @@ static void purge_attachment(thread_db* tdbb, StableAttachmentPart* sAtt, unsign
|
||||
attachment->att_flags = save_flags;
|
||||
tdbb->tdbb_flags |= TDBB_detaching;
|
||||
|
||||
if (attachment->att_trace_manager->needs(ITraceFactory::TRACE_EVENT_ERROR))
|
||||
{
|
||||
FbLocalStatus status;
|
||||
ex.stuffException(&status);
|
||||
|
||||
TraceConnectionImpl conn(attachment);
|
||||
TraceStatusVectorImpl traceStatus(&status, TraceStatusVectorImpl::TS_ERRORS);
|
||||
|
||||
attachment->att_trace_manager->event_error(&conn, &traceStatus, FB_FUNCTION);
|
||||
}
|
||||
|
||||
string s;
|
||||
s.printf("Database: %s\n\tError at disconnect:", attachment->att_filename.c_str());
|
||||
iscLogException(s.c_str(), ex);
|
||||
|
Loading…
Reference in New Issue
Block a user