Navigation Menu

Skip to content

Commit

Permalink
Improve diagnostics of internal trace errors (see CORE-3413 and CORE-…
Browse files Browse the repository at this point in the history
…6075)
  • Loading branch information
hvlad committed Jun 26, 2019
1 parent 4dbb997 commit 54221b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/utilities/ntrace/TraceConfiguration.cpp
Expand Up @@ -109,7 +109,10 @@ void TraceCfgReader::readConfig()

const bool isDatabase = (section->name == "database");
if (!isDatabase && section->name != "services")
continue;
//continue;
fatal_exception::raiseFmt(ERROR_PREFIX
"line %d: wrong section header, \"database\" or \"service\" is expected",
section->line);

const ConfigFile::String pattern = section->value;
bool match = false;
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/ntrace/traceplugin.cpp
Expand Up @@ -101,7 +101,7 @@ Firebird::ITracePlugin* TraceFactoryImpl::trace_create(Firebird::CheckStatusWrap
{
const char* strEx = TracePluginImpl::marshal_exception(ex);
Firebird::string err;
if (dbname)
if (dbname && dbname[0])
err.printf("Error creating trace session for database \"%s\":\n%s\n", dbname, strEx);
else
err.printf("Error creating trace session for service manager attachment:\n%s\n", strEx);
Expand Down

0 comments on commit 54221b3

Please sign in to comment.