changeset 816:b9f2946c15df

more detailed errors
author Alain Mazy <am@orthanc.team>
date Mon, 01 Jun 2026 18:58:10 +0200
parents 724549b890eb
children 1994604b2aec
files Framework/PostgreSQL/PostgreSQLResult.cpp Framework/PostgreSQL/PostgreSQLStatement.cpp
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/PostgreSQL/PostgreSQLResult.cpp	Mon May 18 15:27:14 2026 +0200
+++ b/Framework/PostgreSQL/PostgreSQLResult.cpp	Mon Jun 01 18:58:10 2026 +0200
@@ -298,7 +298,7 @@
         return new Integer64Value(GetTimestamp(column));
 
       default:
-        throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
+        throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, std::string("Unknown value type: ") + boost::lexical_cast<std::string>(type));
     }
   }
 }
--- a/Framework/PostgreSQL/PostgreSQLStatement.cpp	Mon May 18 15:27:14 2026 +0200
+++ b/Framework/PostgreSQL/PostgreSQLStatement.cpp	Mon Jun 01 18:58:10 2026 +0200
@@ -370,7 +370,7 @@
 
         case ValueType_Null:
         default:
-          throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
+          throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, std::string("Invalid parameter type ") + boost::lexical_cast<std::string>(formatter_.GetParameterType(i)) + " for parameter " + boost::lexical_cast<std::string>(i));
       }
     }
   }