From 718a51128c56d52a9fc47ad300c8c6c227c648b5 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Wed, 8 Feb 2023 11:37:33 +0100 Subject: Avoid implicit-exception-spec-mismatch warning. --- document/src/vespa/document/base/exceptions.cpp | 4 ++++ document/src/vespa/document/base/exceptions.h | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'document') diff --git a/document/src/vespa/document/base/exceptions.cpp b/document/src/vespa/document/base/exceptions.cpp index b0c2cf05eb1..f1ea0645eb8 100644 --- a/document/src/vespa/document/base/exceptions.cpp +++ b/document/src/vespa/document/base/exceptions.cpp @@ -61,6 +61,8 @@ DataTypeNotFoundException::DataTypeNotFoundException(const vespalib::string& nam { } +DataTypeNotFoundException::~DataTypeNotFoundException() = default; + AnnotationTypeNotFoundException::AnnotationTypeNotFoundException( int id, const vespalib::string& location) : Exception(vespalib::make_string("Data type with id %d not found", id), @@ -68,6 +70,8 @@ AnnotationTypeNotFoundException::AnnotationTypeNotFoundException( { } +AnnotationTypeNotFoundException::~AnnotationTypeNotFoundException() = default; + FieldNotFoundException:: FieldNotFoundException(const vespalib::string& fieldName, const vespalib::string& location) diff --git a/document/src/vespa/document/base/exceptions.h b/document/src/vespa/document/base/exceptions.h index 6e91b5c08ee..4358daed5ec 100644 --- a/document/src/vespa/document/base/exceptions.h +++ b/document/src/vespa/document/base/exceptions.h @@ -22,7 +22,7 @@ public: InvalidDataTypeException(const DataType &actual, const DataType &wanted, const vespalib::string & location); - virtual ~InvalidDataTypeException(); + ~InvalidDataTypeException() override; const DataType& getActualDataType() const { return _actual; } const DataType& getExpectedDataType() const { return _expected; } @@ -48,7 +48,7 @@ public: InvalidDataTypeConversionException(const DataType &actual, const DataType &wanted, const vespalib::string & location); - virtual ~InvalidDataTypeConversionException() throw(); + ~InvalidDataTypeConversionException() override; const DataType& getActualDataType() const { return _actual; } const DataType& getExpectedDataType() const { return _expected; } @@ -93,6 +93,7 @@ class DataTypeNotFoundException : public vespalib::Exception public: DataTypeNotFoundException(int id, const vespalib::string& location); DataTypeNotFoundException(const vespalib::string& name, const vespalib::string& location); + ~DataTypeNotFoundException() override; VESPA_DEFINE_EXCEPTION_SPINE(DataTypeNotFoundException); }; @@ -107,6 +108,7 @@ class AnnotationTypeNotFoundException : public vespalib::Exception { public: AnnotationTypeNotFoundException(int id, const vespalib::string& location); + ~AnnotationTypeNotFoundException() override; VESPA_DEFINE_EXCEPTION_SPINE(AnnotationTypeNotFoundException); }; -- cgit v1.2.3