Mercurial > hg > orthanc-databases
changeset 818:f377801f5980
more verbose NotImplemented errors
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Mon, 01 Jun 2026 22:55:53 +0200 |
| parents | 1994604b2aec |
| children | 55d6c6aeb19a |
| files | Framework/Common/GenericFormatter.cpp Framework/Plugins/ISqlLookupFormatter.cpp Framework/Plugins/IndexBackend.cpp Framework/Plugins/IndexBackend.h Odbc/Plugins/StoragePlugin.cpp |
| diffstat | 5 files changed, 27 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/Common/GenericFormatter.cpp Mon Jun 01 18:58:25 2026 +0200 +++ b/Framework/Common/GenericFormatter.cpp Mon Jun 01 22:55:53 2026 +0200 @@ -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);
--- a/Framework/Plugins/ISqlLookupFormatter.cpp Mon Jun 01 18:58:25 2026 +0200 +++ b/Framework/Plugins/ISqlLookupFormatter.cpp Mon Jun 01 22:55:53 2026 +0200 @@ -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)
--- a/Framework/Plugins/IndexBackend.cpp Mon Jun 01 18:58:25 2026 +0200 +++ b/Framework/Plugins/IndexBackend.cpp Mon Jun 01 22:55:53 2026 +0200 @@ -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() @@ -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"); } } @@ -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; } @@ -4484,7 +4484,7 @@ }; break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Invalid queryId"); } statement->Next(); } @@ -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());
--- a/Framework/Plugins/IndexBackend.h Mon Jun 01 18:58:25 2026 +0200 +++ b/Framework/Plugins/IndexBackend.h Mon Jun 01 22:55:53 2026 +0200 @@ -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"); } /**
--- a/Odbc/Plugins/StoragePlugin.cpp Mon Jun 01 18:58:25 2026 +0200 +++ b/Odbc/Plugins/StoragePlugin.cpp Mon Jun 01 22:55:53 2026 +0200 @@ -80,7 +80,7 @@ break; default: - throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); + throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented, "Unsupported dialect"); } {
