aboutsummaryrefslogtreecommitdiff
path: root/odb/pgsql/exceptions.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'odb/pgsql/exceptions.cxx')
-rw-r--r--odb/pgsql/exceptions.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/odb/pgsql/exceptions.cxx b/odb/pgsql/exceptions.cxx
index fd8bb87..28e7fc4 100644
--- a/odb/pgsql/exceptions.cxx
+++ b/odb/pgsql/exceptions.cxx
@@ -1,5 +1,4 @@
// file : odb/pgsql/exceptions.cxx
-// copyright : Copyright (c) 2005-2019 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
#include <sstream>
@@ -27,7 +26,10 @@ namespace odb
const string& message)
: sqlstate_ (sqlstate), message_ (message)
{
- what_ = sqlstate_ + ": " + message_;
+ if (!sqlstate_.empty ())
+ what_ = sqlstate_ + ": " + message_;
+ else
+ what_ = message_;
}
database_exception::