Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package orthanc-postgresql for openSUSE:Factory checked in at 2026-07-31 15:31:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/orthanc-postgresql (Old) and /work/SRC/openSUSE:Factory/.orthanc-postgresql.new.2004 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "orthanc-postgresql" Fri Jul 31 15:31:12 2026 rev:18 rq:1368537 version:10.2 Changes: -------- --- /work/SRC/openSUSE:Factory/orthanc-postgresql/orthanc-postgresql.changes 2026-04-20 16:14:27.209007104 +0200 +++ /work/SRC/openSUSE:Factory/.orthanc-postgresql.new.2004/orthanc-postgresql.changes 2026-07-31 16:09:34.649167388 +0200 @@ -1,0 +2,8 @@ +Wed Jul 29 09:24:29 UTC 2026 - Axel Braun <[email protected]> + +- version 10.2 + * Internal changes only: + - Enable linking with libpq18 (Ubuntu 26.04). + - Show more details when an internal error occurs. + +------------------------------------------------------------------- Old: ---- OrthancPostgreSQL-10.1.tar.gz New: ---- OrthancPostgreSQL-10.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ orthanc-postgresql.spec ++++++ --- /var/tmp/diff_new_pack.y99lSx/_old 2026-07-31 16:09:35.241187982 +0200 +++ /var/tmp/diff_new_pack.y99lSx/_new 2026-07-31 16:09:35.245188122 +0200 @@ -21,7 +21,7 @@ Summary: Database plugin for Orthanc License: AGPL-3.0-or-later Group: Productivity/Databases/Tools -Version: 10.1 +Version: 10.2 Release: 0 URL: https://orthanc-server.com Source0: https://orthanc.uclouvain.be/downloads/sources/%{name}/OrthancPostgreSQL-%{version}.tar.gz ++++++ OrthancPostgreSQL-10.1.tar.gz -> OrthancPostgreSQL-10.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/.hg_archival.txt new/OrthancPostgreSQL-10.2/.hg_archival.txt --- old/OrthancPostgreSQL-10.1/.hg_archival.txt 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/.hg_archival.txt 2026-06-23 11:03:44.000000000 +0200 @@ -1,6 +1,6 @@ repo: 7cea966b682978aa285eb9b3a7a9cff81df464b3 -node: 99f9e7d6b708eef26ed4dbcd549840424acb642f -branch: OrthancPostgreSQL-10.1 +node: 55fde62793df16fe94c82c547602a10a01a1708f +branch: OrthancPostgreSQL-10.2 latesttag: null -latesttagdistance: 669 -changessincelatesttag: 765 +latesttagdistance: 682 +changessincelatesttag: 781 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/BinaryStringValue.cpp new/OrthancPostgreSQL-10.2/Framework/Common/BinaryStringValue.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/BinaryStringValue.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/BinaryStringValue.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -25,7 +25,7 @@ #include "NullValue.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/DatabaseManager.cpp new/OrthancPostgreSQL-10.2/Framework/Common/DatabaseManager.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/DatabaseManager.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/DatabaseManager.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -29,7 +29,7 @@ #include <Compatibility.h> // For std::unique_ptr<> #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/thread.hpp> @@ -104,7 +104,7 @@ if (statement.get() == NULL) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } else { @@ -195,13 +195,13 @@ if (database_.get() == NULL) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } dialect_ = database_->GetDialect(); if (dialect_ == Dialect_Unknown) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } @@ -213,7 +213,7 @@ { if (database_.get() == NULL) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/DatabasesEnumerations.cpp new/OrthancPostgreSQL-10.2/Framework/Common/DatabasesEnumerations.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/DatabasesEnumerations.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/DatabasesEnumerations.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -23,7 +23,7 @@ #include "DatabasesEnumerations.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" namespace OrthancDatabases { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/Dictionary.cpp new/OrthancPostgreSQL-10.2/Framework/Common/Dictionary.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/Dictionary.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/Dictionary.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -31,7 +31,7 @@ #include "Utf8StringValue.h" #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <cassert> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/GenericFormatter.cpp new/OrthancPostgreSQL-10.2/Framework/Common/GenericFormatter.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/GenericFormatter.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/GenericFormatter.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -23,7 +23,7 @@ #include "GenericFormatter.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> @@ -76,7 +76,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } } else @@ -94,7 +94,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } parametersName_.push_back(source); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/IResult.cpp new/OrthancPostgreSQL-10.2/Framework/Common/IResult.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/IResult.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/IResult.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -26,7 +26,7 @@ #include "Utf8StringValue.h" #include <Compatibility.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <cassert> #include <list> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/ImplicitTransaction.cpp new/OrthancPostgreSQL-10.2/Framework/Common/ImplicitTransaction.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/ImplicitTransaction.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/ImplicitTransaction.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -25,7 +25,7 @@ #include <Compatibility.h> // For std::unique_ptr<> #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <memory> @@ -83,7 +83,7 @@ throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } @@ -117,7 +117,7 @@ throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls); default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/InputFileValue.cpp new/OrthancPostgreSQL-10.2/Framework/Common/InputFileValue.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/InputFileValue.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/InputFileValue.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -26,7 +26,7 @@ #include "BinaryStringValue.h" #include "NullValue.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/Integer32Value.cpp new/OrthancPostgreSQL-10.2/Framework/Common/Integer32Value.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/Integer32Value.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/Integer32Value.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -27,7 +27,7 @@ #include "NullValue.h" #include "Utf8StringValue.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/Integer64Value.cpp new/OrthancPostgreSQL-10.2/Framework/Common/Integer64Value.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/Integer64Value.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/Integer64Value.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -27,7 +27,7 @@ #include "NullValue.h" #include "Utf8StringValue.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/NullValue.cpp new/OrthancPostgreSQL-10.2/Framework/Common/NullValue.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/NullValue.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/NullValue.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -25,7 +25,7 @@ #include "Utf8StringValue.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" namespace OrthancDatabases { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/Query.cpp new/OrthancPostgreSQL-10.2/Framework/Common/Query.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/Query.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/Query.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -24,7 +24,7 @@ #include "Query.h" #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/regex.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/ResultBase.cpp new/OrthancPostgreSQL-10.2/Framework/Common/ResultBase.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/ResultBase.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/ResultBase.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -30,7 +30,7 @@ #include <Compatibility.h> // For std::unique_ptr<> #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <cassert> #include <memory> @@ -148,7 +148,7 @@ } else if (fields_[index] == NULL) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/ResultFileValue.cpp new/OrthancPostgreSQL-10.2/Framework/Common/ResultFileValue.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/ResultFileValue.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/ResultFileValue.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -26,7 +26,7 @@ #include "BinaryStringValue.h" #include "NullValue.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/RetryDatabaseFactory.cpp new/OrthancPostgreSQL-10.2/Framework/Common/RetryDatabaseFactory.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/RetryDatabaseFactory.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/RetryDatabaseFactory.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -24,7 +24,7 @@ #include "RetryDatabaseFactory.h" #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/thread.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Common/Utf8StringValue.cpp new/OrthancPostgreSQL-10.2/Framework/Common/Utf8StringValue.cpp --- old/OrthancPostgreSQL-10.1/Framework/Common/Utf8StringValue.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Common/Utf8StringValue.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -27,7 +27,7 @@ #include "NullValue.h" #include "Integer64Value.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Plugins/DatabaseBackendAdapterV2.cpp new/OrthancPostgreSQL-10.2/Framework/Plugins/DatabaseBackendAdapterV2.cpp --- old/OrthancPostgreSQL-10.1/Framework/Plugins/DatabaseBackendAdapterV2.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Plugins/DatabaseBackendAdapterV2.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -27,7 +27,7 @@ #include "IndexBackend.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/thread/mutex.hpp> #include <list> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Plugins/DatabaseBackendAdapterV3.cpp new/OrthancPostgreSQL-10.2/Framework/Plugins/DatabaseBackendAdapterV3.cpp --- old/OrthancPostgreSQL-10.1/Framework/Plugins/DatabaseBackendAdapterV3.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Plugins/DatabaseBackendAdapterV3.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -29,7 +29,7 @@ #include "IndexConnectionsPool.h" #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <stdexcept> #include <list> @@ -178,7 +178,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } answerType_ = _OrthancPluginDatabaseAnswerType_None; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Plugins/DatabaseBackendAdapterV4.cpp new/OrthancPostgreSQL-10.2/Framework/Plugins/DatabaseBackendAdapterV4.cpp --- old/OrthancPostgreSQL-10.1/Framework/Plugins/DatabaseBackendAdapterV4.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Plugins/DatabaseBackendAdapterV4.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -34,7 +34,7 @@ #include <OrthancDatabasePlugin.pb.h> // Include protobuf messages #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <stdexcept> #include <list> @@ -506,7 +506,7 @@ case Orthanc::DatabasePluginMessages::OPERATION_FLUSH_TO_DISK: // Raise an exception since "set_supports_flush_to_disk(false)" - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); case Orthanc::DatabasePluginMessages::OPERATION_START_TRANSACTION: { @@ -1273,7 +1273,7 @@ case OrthancPluginResourceType_Instance: if (parent.empty()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } else { @@ -1284,7 +1284,7 @@ case OrthancPluginResourceType_Patient: if (!parent.empty()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Plugins/DatabaseConstraint.cpp new/OrthancPostgreSQL-10.2/Framework/Plugins/DatabaseConstraint.cpp --- old/OrthancPostgreSQL-10.1/Framework/Plugins/DatabaseConstraint.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Plugins/DatabaseConstraint.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -30,7 +30,7 @@ #include "DatabaseConstraint.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> #include <cassert> @@ -278,7 +278,7 @@ } default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } s += "\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Plugins/ISqlLookupFormatter.cpp new/OrthancPostgreSQL-10.2/Framework/Plugins/ISqlLookupFormatter.cpp --- old/OrthancPostgreSQL-10.1/Framework/Plugins/ISqlLookupFormatter.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Plugins/ISqlLookupFormatter.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -32,7 +32,7 @@ #include "DatabaseConstraint.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <Toolbox.h> #include <boost/algorithm/string/join.hpp> @@ -60,7 +60,7 @@ return "instances"; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } @@ -83,7 +83,7 @@ return std::string(prefix) + "instances"; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } #endif @@ -124,7 +124,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } std::string parameter = formatter.GenerateParameter(values[0]); @@ -246,7 +246,7 @@ constraintType = OrthancDatabases::ConstraintType_Wildcard; break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported constraint type"); } if (constraint.type() == Orthanc::DatabasePluginMessages::CONSTRAINT_LIST) @@ -496,7 +496,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } std::string parameter = formatter.GenerateParameter(constraint.GetSingleValue()); @@ -764,7 +764,7 @@ } else { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } @@ -781,7 +781,7 @@ case Orthanc::ResourceType_Instance: return request.orthanc_id_instance(); default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } @@ -828,7 +828,7 @@ FormatJoinForOrdering(orderingJoin, ordering.metadata(), i, queryLevel); break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } orderingJoins += orderingJoin; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Plugins/IndexBackend.cpp new/OrthancPostgreSQL-10.2/Framework/Plugins/IndexBackend.cpp --- old/OrthancPostgreSQL-10.1/Framework/Plugins/IndexBackend.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Plugins/IndexBackend.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -31,7 +31,7 @@ #include <Compatibility.h> // For std::unique_ptr<> #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <Toolbox.h> #if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 12, 11) @@ -109,7 +109,7 @@ { if (statement.GetResultFieldsCount() != 1) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } statement.SetResultFieldType(0, ValueType_Integer64); @@ -135,7 +135,7 @@ { if (statement.GetResultFieldsCount() != 1) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } while (!statement.IsDone()) @@ -956,7 +956,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } statement->SetReadOnly(true); @@ -1025,7 +1025,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } statement->SetReadOnly(true); @@ -1063,7 +1063,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } statement->SetReadOnly(true); @@ -1354,7 +1354,7 @@ int32_t property, int64_t increment) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "IncrementGlobalProperty shall be overloaded"); } bool IndexBackend::HasUpdateAndGetStatistics() @@ -1370,7 +1370,7 @@ int64_t& compressedSize, int64_t& uncompressedSize) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "UpdateAndGetStatistics shall be overloaded"); } bool IndexBackend::HasMeasureLatency() @@ -2001,7 +2001,7 @@ OrthancPluginStorageArea* storageArea) { LOG(ERROR) << "Upgrading database is not implemented by this plugin"; - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } @@ -2063,7 +2063,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } statement->SetReadOnly(true); @@ -2087,7 +2087,7 @@ break; case Dialect_PostgreSQL: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "GetUnprotectedPatientsCount is overloaded in PostgreSQL"); break; case Dialect_MSSQL: @@ -2098,7 +2098,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } statement->SetReadOnly(true); @@ -2215,7 +2215,7 @@ return "ESCAPE '\\\\'"; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } } @@ -2231,7 +2231,7 @@ return "NULL"; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } } @@ -2340,7 +2340,7 @@ } }; break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } } @@ -2397,7 +2397,7 @@ } }; break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } return sql; @@ -2427,7 +2427,7 @@ case Dialect_MySQL: return "SIGNED"; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } } @@ -2443,7 +2443,7 @@ case Dialect_MySQL: return "DECIMAL(10,10)"; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } } @@ -2519,7 +2519,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } } @@ -2557,7 +2557,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } } @@ -2865,7 +2865,7 @@ { if (statement.GetResultFieldsCount() != 3) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } statement.SetResultFieldType(0, ValueType_Integer64); @@ -2888,7 +2888,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } assert((statement.Next(), statement.IsDone())); @@ -2920,7 +2920,7 @@ { if (statement.GetResultFieldsCount() != 2) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } statement.SetResultFieldType(0, ValueType_Integer64); @@ -3082,7 +3082,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } statement->SetParameterType("id", ValueType_Integer64); @@ -3264,7 +3264,7 @@ return measures[measures.size() / 2]; #else - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "MeasureLatency is not supported"); #endif } @@ -3308,7 +3308,7 @@ content = response->mutable_instance_content(); break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Invalid level in GetResourceContent"); } return content; } @@ -3331,7 +3331,7 @@ content = response->mutable_children_instances_content(); break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Invalid level in GetChildrenContent"); } return content; } @@ -3499,7 +3499,7 @@ " INNER JOIN Lookup ON childLevel.parentId = Lookup.internalId"; }; break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } sql += ", _OneInstance AS (" + oneInstanceSqlCTE + ") "; sql += ", OneInstance AS (SELECT parentInternalId, instancePublicId, instanceInternalId FROM _OneInstance WHERE rowNum = 1) "; // this is a generic way to implement DISTINCT ON @@ -4484,7 +4484,7 @@ }; break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Invalid queryId"); } statement->Next(); } @@ -4595,7 +4595,7 @@ { if (statement->GetResultFieldsCount() != 2) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } statement->SetResultFieldType(0, ValueType_Utf8String); @@ -4665,7 +4665,7 @@ } break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } statement->Execute(formatter.GetDictionary()); @@ -4728,7 +4728,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } DatabaseManager::CachedStatement statement(STATEMENT_FROM_HERE_DYNAMIC(sql), manager, sql); @@ -4772,7 +4772,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } statement->Execute(formatter.GetDictionary()); @@ -4934,7 +4934,7 @@ { if (statement.GetResultFieldsCount() != 7) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } statement.SetResultFieldType(0, ValueType_Utf8String); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Plugins/IndexBackend.h new/OrthancPostgreSQL-10.2/Framework/Plugins/IndexBackend.h --- old/OrthancPostgreSQL-10.1/Framework/Plugins/IndexBackend.h 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Plugins/IndexBackend.h 2026-06-23 11:03:44.000000000 +0200 @@ -25,7 +25,7 @@ #include "IDatabaseBackend.h" -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/thread/shared_mutex.hpp> @@ -390,7 +390,7 @@ const char* hashSeries, const char* hashInstance) ORTHANC_OVERRIDE { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } #endif @@ -555,7 +555,7 @@ virtual void PerformDbHousekeeping(DatabaseManager& manager) ORTHANC_OVERRIDE { - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "PerformDbHousekeeping should be overloaded"); } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Plugins/IndexUnitTests.h new/OrthancPostgreSQL-10.2/Framework/Plugins/IndexUnitTests.h --- old/OrthancPostgreSQL-10.1/Framework/Plugins/IndexUnitTests.h 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Plugins/IndexUnitTests.h 2026-06-23 11:03:44.000000000 +0200 @@ -249,7 +249,7 @@ if (!db.GetKeyValue(value, manager, storeId, item.key()) || value != item.value()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } } @@ -282,7 +282,7 @@ if (keys.size() != keys2.size()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } else { @@ -290,7 +290,7 @@ { if (keys2.find(*it) == keys2.end()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } } @@ -933,7 +933,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/Plugins/StorageBackend.cpp new/OrthancPostgreSQL-10.2/Framework/Plugins/StorageBackend.cpp --- old/OrthancPostgreSQL-10.1/Framework/Plugins/StorageBackend.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/Plugins/StorageBackend.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -32,7 +32,7 @@ #include <Compatibility.h> // For std::unique_ptr<> #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/thread.hpp> #include <cassert> @@ -349,7 +349,7 @@ { if (success_) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } else { @@ -425,13 +425,13 @@ { if (success_) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } else { if (content.size() != target_->size) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } if (!content.empty()) @@ -543,7 +543,7 @@ { if (success_) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } else if (data_ == NULL) { @@ -730,7 +730,7 @@ { if (success_) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } else { @@ -751,7 +751,7 @@ if (!visitor.IsSuccess()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } @@ -768,7 +768,7 @@ if (!visitor.IsSuccess()) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } @@ -778,7 +778,7 @@ std::unique_ptr<IAccessor> accessor(CreateAccessor()); if (accessor.get() == NULL) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } #if ORTHANC_FRAMEWORK_VERSION_IS_ABOVE(1, 9, 2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLDatabase.cpp new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLDatabase.cpp --- old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLDatabase.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLDatabase.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -31,7 +31,7 @@ #include "PostgreSQLTransaction.h" #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <Toolbox.h> #include <boost/lexical_cast.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLLargeObject.cpp new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLLargeObject.cpp --- old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLLargeObject.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLLargeObject.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -27,7 +27,7 @@ #include "PostgreSQLLargeObject.h" #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> #include <libpq/libpq-fs.h> @@ -164,7 +164,7 @@ { if (target.size() != size_) { - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } PGconn* pg = reinterpret_cast<PGconn*>(database_.pg_); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLParameters.cpp new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLParameters.cpp --- old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLParameters.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLParameters.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -24,7 +24,7 @@ #include "PostgreSQLParameters.h" #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <Toolbox.h> #include <boost/lexical_cast.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLResult.cpp new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLResult.cpp --- old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLResult.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLResult.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -31,7 +31,7 @@ #include "../Common/Utf8StringValue.h" #include <Compatibility.h> // For std::unique_ptr<> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <Logging.h> #include <Endianness.h> @@ -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)); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLStatement.cpp new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLStatement.cpp --- old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLStatement.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLStatement.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -35,7 +35,7 @@ #include <Compatibility.h> // For std::unique_ptr<> #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <Toolbox.h> #include <Endianness.h> @@ -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)); } } } @@ -580,7 +580,7 @@ } default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLTransaction.cpp new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLTransaction.cpp --- old/OrthancPostgreSQL-10.1/Framework/PostgreSQL/PostgreSQLTransaction.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Framework/PostgreSQL/PostgreSQLTransaction.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -27,7 +27,7 @@ #include <Compatibility.h> // For std::unique_ptr<> #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" namespace OrthancDatabases { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/PostgreSQL/CMakeLists.txt new/OrthancPostgreSQL-10.2/PostgreSQL/CMakeLists.txt --- old/OrthancPostgreSQL-10.1/PostgreSQL/CMakeLists.txt 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/PostgreSQL/CMakeLists.txt 2026-06-23 11:03:44.000000000 +0200 @@ -22,7 +22,7 @@ cmake_minimum_required(VERSION 2.8...4.0) project(OrthancPostgreSQL) -set(ORTHANC_PLUGIN_VERSION "10.1") +set(ORTHANC_PLUGIN_VERSION "10.2") # This is the preferred version of the Orthanc SDK for this plugin set(ORTHANC_SDK_DEFAULT_VERSION "1.12.10") @@ -43,7 +43,7 @@ set(ORTHANC_FRAMEWORK_VERSION "mainline") set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "hg") else() - set(ORTHANC_FRAMEWORK_VERSION "1.12.11") # while waiting for 1.12.11 for Orthanc::Toolbox::ToLowerCaseWithAccents + set(ORTHANC_FRAMEWORK_VERSION "1.12.11") # 1.12.11 has a bug in ImageAccessor but it is not an issue here ! set(ORTHANC_FRAMEWORK_DEFAULT_SOURCE "web") endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/PostgreSQL/NEWS new/OrthancPostgreSQL-10.2/PostgreSQL/NEWS --- old/OrthancPostgreSQL-10.1/PostgreSQL/NEWS 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/PostgreSQL/NEWS 2026-06-23 11:03:44.000000000 +0200 @@ -1,3 +1,12 @@ +Release 10.2 (2026-06-23) +========================= + +Changes: +* Internal changes only: + - Enable linking with libpq18 (Ubuntu 26.04). + - Show more details when an internal error occurs. + + Release 10.1 (2026-04-14) ========================= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/PostgreSQL/Plugins/IndexPlugin.cpp new/OrthancPostgreSQL-10.2/PostgreSQL/Plugins/IndexPlugin.cpp --- old/OrthancPostgreSQL-10.1/PostgreSQL/Plugins/IndexPlugin.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/PostgreSQL/Plugins/IndexPlugin.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -42,7 +42,7 @@ #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 0) GOOGLE_PROTOBUF_VERIFY_VERSION; #endif - + if (!OrthancDatabases::InitializePlugin(context, ORTHANC_PLUGIN_NAME, "PostgreSQL", true)) { return -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/PostgreSQL/Plugins/PostgreSQLIndex.cpp new/OrthancPostgreSQL-10.2/PostgreSQL/Plugins/PostgreSQLIndex.cpp --- old/OrthancPostgreSQL-10.1/PostgreSQL/Plugins/PostgreSQLIndex.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/PostgreSQL/Plugins/PostgreSQLIndex.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -34,7 +34,7 @@ #include <Toolbox.h> #include <SystemToolbox.h> #include <Logging.h> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/algorithm/string/join.hpp> @@ -129,7 +129,7 @@ if (!t.GetDatabaseTransaction().DoesSchemaExist(parameters_.GetSchema())) { LOG(ERROR) << "The schema '" << parameters_.GetSchema() << "' does not exist. If you are not using the 'public' schema, you must create the schema manually before starting Orthanc."; - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } if (!t.GetDatabaseTransaction().DoesTableExist("Resources")) @@ -142,7 +142,7 @@ if (!t.GetDatabaseTransaction().DoesTableExist("Resources")) { LOG(ERROR) << "Corrupted PostgreSQL database or failed to create the database schema"; - throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(Orthanc::ErrorCode_NotImplemented); } } else @@ -1006,7 +1006,7 @@ catch (Orthanc::OrthancException&) { // the statement may fail in case of temporary deadlock -> it will be retried at the next HK - LOG(INFO) << "Updat of invalid ChildCount entries has failed (will be retried)"; + LOG(INFO) << "Update of invalid ChildCount entries has failed (will be retried)"; } } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/PostgreSQL/UnitTests/PostgreSQLTests.cpp new/OrthancPostgreSQL-10.2/PostgreSQL/UnitTests/PostgreSQLTests.cpp --- old/OrthancPostgreSQL-10.1/PostgreSQL/UnitTests/PostgreSQLTests.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/PostgreSQL/UnitTests/PostgreSQLTests.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -44,7 +44,7 @@ #include "../Plugins/PostgreSQLStorageArea.h" #include <Compatibility.h> // For std::unique_ptr<> -#include <OrthancException.h> +#include "../../Resources/Orthanc/Plugins/OrthancPluginException.h" #include <boost/lexical_cast.hpp> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Resources/CMake/PostgreSQLConfiguration.cmake new/OrthancPostgreSQL-10.2/Resources/CMake/PostgreSQLConfiguration.cmake --- old/OrthancPostgreSQL-10.1/Resources/CMake/PostgreSQLConfiguration.cmake 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Resources/CMake/PostgreSQLConfiguration.cmake 2026-06-23 11:03:44.000000000 +0200 @@ -530,7 +530,7 @@ else() set(PostgreSQL_ADDITIONAL_VERSIONS - "17" "16" "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") + "18" "17" "16" "15" "14" "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0") if (NOT WIN32) foreach (suffix ${PostgreSQL_ADDITIONAL_VERSIONS}) list(APPEND PostgreSQL_ADDITIONAL_SEARCH_PATHS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Resources/Orthanc/CMake/DownloadPackage.cmake new/OrthancPostgreSQL-10.2/Resources/Orthanc/CMake/DownloadPackage.cmake --- old/OrthancPostgreSQL-10.1/Resources/Orthanc/CMake/DownloadPackage.cmake 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Resources/Orthanc/CMake/DownloadPackage.cmake 2026-06-23 11:03:44.000000000 +0200 @@ -92,7 +92,7 @@ set(TMP_PATH "${CMAKE_SOURCE_DIR}/ThirdPartyDownloads/${TMP_FILENAME}") if (NOT EXISTS "${TMP_PATH}") - message("Downloading ${Url}") + message("Downloading ${Url} since the file was not found in ${TMP_PATH}") # This fixes issue 6: "I think cmake shouldn't download the # packages which are not in the system, it should stop and let diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp new/OrthancPostgreSQL-10.2/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp --- old/OrthancPostgreSQL-10.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp 2026-06-23 11:03:44.000000000 +0200 @@ -28,7 +28,7 @@ #include <boost/move/unique_ptr.hpp> #include <boost/thread.hpp> #include <boost/algorithm/string/join.hpp> - +#include <limits> #include <json/reader.h> #include <json/version.h> @@ -227,7 +227,7 @@ { Clear(); } - catch (ORTHANC_PLUGINS_EXCEPTION_CLASS&) + catch (ORTHANC_PLUGINS_EXCEPTION_CLASS&) // NOLINT(bugprone-empty-catch) { // Don't throw exceptions in destructors } @@ -264,7 +264,7 @@ } else { - if (size > 0) + if (buffer != NULL && size > 0) { memcpy(buffer_.data, buffer, size); } @@ -675,7 +675,7 @@ { Clear(); } - catch (ORTHANC_PLUGINS_EXCEPTION_CLASS&) + catch (ORTHANC_PLUGINS_EXCEPTION_CLASS&) // NOLINT(bugprone-empty-catch) { // Don't throw exceptions in destructors } @@ -977,7 +977,15 @@ return true; case Json::uintValue: - target = configuration_[key].asUInt(); + if (configuration_[key].asUInt() > static_cast<unsigned int>(std::numeric_limits<int>::max())) + { + ORTHANC_PLUGINS_LOG_ERROR("The configuration option \"" + GetPath(key) + + "\" is too large to fit in an integer"); + + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); + } + + target = static_cast<int>(configuration_[key].asUInt()); return true; default: @@ -1338,7 +1346,7 @@ { Clear(); } - catch (ORTHANC_PLUGINS_EXCEPTION_CLASS&) + catch (ORTHANC_PLUGINS_EXCEPTION_CLASS&) // NOLINT(bugprone-empty-catch) { // Don't throw exceptions in destructors } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/Resources/Orthanc/Plugins/OrthancPluginException.h new/OrthancPostgreSQL-10.2/Resources/Orthanc/Plugins/OrthancPluginException.h --- old/OrthancPostgreSQL-10.1/Resources/Orthanc/Plugins/OrthancPluginException.h 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/Resources/Orthanc/Plugins/OrthancPluginException.h 2026-06-23 11:03:44.000000000 +0200 @@ -40,14 +40,30 @@ # define ORTHANC_PLUGINS_GET_ERROR_CODE(code) ::OrthancPluginErrorCode_ ## code #endif +#if HAS_ORTHANC_EXCEPTION == 1 && defined(__ORTHANC_FILE__) // the OrthancException accepts a detail argument -> add the file and line number +# define PLUGIN_ORTHANC_EXCEPTION_STRINGIFY_LINE_HELPER(line) #line +# define PLUGIN_ORTHANC_EXCEPTION_STRINGIFY_LINE(line) PLUGIN_ORTHANC_EXCEPTION_STRINGIFY_LINE_HELPER(line) +# define PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(errorCode) \ + throw ::Orthanc::OrthancException( \ + errorCode, #errorCode " triggered from " __ORTHANC_FILE__ ":" \ + PLUGIN_ORTHANC_EXCEPTION_STRINGIFY_LINE(__LINE__)) -#define ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(code) \ - throw ORTHANC_PLUGINS_EXCEPTION_CLASS(static_cast<ORTHANC_PLUGINS_ERROR_ENUMERATION>(code)); +# define ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(code) \ + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(static_cast<ORTHANC_PLUGINS_ERROR_ENUMERATION>(code)) +# define ORTHANC_PLUGINS_THROW_EXCEPTION(code) \ + PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(ORTHANC_PLUGINS_GET_ERROR_CODE(code)) -#define ORTHANC_PLUGINS_THROW_EXCEPTION(code) \ - throw ORTHANC_PLUGINS_EXCEPTION_CLASS(ORTHANC_PLUGINS_GET_ERROR_CODE(code)); - +#else // the PluginException does not accept a detail argument +# define ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(code) \ + throw ORTHANC_PLUGINS_EXCEPTION_CLASS(static_cast<ORTHANC_PLUGINS_ERROR_ENUMERATION>(code)); + +# define PLUGIN_THROW_WITH_FILE_AND_LINE_INFO(errorCode) \ + ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(errorCode) + +# define ORTHANC_PLUGINS_THROW_EXCEPTION(code) \ + throw ORTHANC_PLUGINS_EXCEPTION_CLASS(ORTHANC_PLUGINS_GET_ERROR_CODE(code)); +#endif #define ORTHANC_PLUGINS_CHECK_ERROR(code) \ if (code != ORTHANC_PLUGINS_GET_ERROR_CODE(Success)) \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/OrthancPostgreSQL-10.1/TODO new/OrthancPostgreSQL-10.2/TODO --- old/OrthancPostgreSQL-10.1/TODO 2026-04-14 14:05:34.000000000 +0200 +++ new/OrthancPostgreSQL-10.2/TODO 2026-06-23 11:03:44.000000000 +0200 @@ -34,7 +34,7 @@ ----- * Store revisions for metadata and attachments in MySQL (this is - already implemented in PostgreSQL) + already implemented in PostgreSQL - done in the mainline) * MySQL performance => implement GlobalProperty_GetTotalSizeIsFast: https://groups.google.com/d/msg/orthanc-users/kSR4a110zDo/D7e4ITR8BwAJ
