From d9f036e25d68d963053f4a88b97e6120e113d979 Mon Sep 17 00:00:00 2001 From: "Schaich, Alonso" Date: Fri, 27 Jun 2025 08:00:56 +0900 Subject: [PATCH 1/4] Add dllexport to MultipleColumnsSelectedError (silverqx/TinyORM#61) --- include/orm/exceptions/multiplecolumnsselectederror.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/orm/exceptions/multiplecolumnsselectederror.hpp b/include/orm/exceptions/multiplecolumnsselectederror.hpp index 7f1e174ae..a7e7f2984 100644 --- a/include/orm/exceptions/multiplecolumnsselectederror.hpp +++ b/include/orm/exceptions/multiplecolumnsselectederror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! Found more that one column (used by DatabaseConnection::scalar()). */ - class MultipleColumnsSelectedError : public RuntimeError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT MultipleColumnsSelectedError : public RuntimeError // clazy:exclude=copyable-polymorphic { public: /*! Constructor. */ From 8bf860a1dacf91b6857d5e230194a900370d8819 Mon Sep 17 00:00:00 2001 From: "Schaich, Alonso" Date: Fri, 27 Jun 2025 08:16:36 +0900 Subject: [PATCH 2/4] Add dllexport to SQLiteDatabaseDoesNotExistError (silverqx/TinyORM#63) --- include/orm/exceptions/sqlitedatabasedoesnotexisterror.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/orm/exceptions/sqlitedatabasedoesnotexisterror.hpp b/include/orm/exceptions/sqlitedatabasedoesnotexisterror.hpp index b6db02301..a13df6e33 100644 --- a/include/orm/exceptions/sqlitedatabasedoesnotexisterror.hpp +++ b/include/orm/exceptions/sqlitedatabasedoesnotexisterror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! TinyORM SQLite database doesn't exist exception. */ - class SQLiteDatabaseDoesNotExistError : public InvalidArgumentError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT SQLiteDatabaseDoesNotExistError : public InvalidArgumentError // clazy:exclude=copyable-polymorphic { public: /*! Path constructor (QString). */ From 252420b2a5d883c2716540a80b1f0fb3b08b3ec7 Mon Sep 17 00:00:00 2001 From: "Schaich, Alonso" Date: Fri, 27 Jun 2025 08:25:13 +0900 Subject: [PATCH 3/4] Add dllexport to InvalidArgumentError (silverqx/TinyORM#65) --- include/orm/exceptions/invalidargumenterror.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/orm/exceptions/invalidargumenterror.hpp b/include/orm/exceptions/invalidargumenterror.hpp index 1e70853f4..5f58a7d07 100644 --- a/include/orm/exceptions/invalidargumenterror.hpp +++ b/include/orm/exceptions/invalidargumenterror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! TinyORM invalid argument exception. */ - class InvalidArgumentError : public LogicError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT InvalidArgumentError : public LogicError // clazy:exclude=copyable-polymorphic { /*! Inherit constructors. */ using LogicError::LogicError; From f09a4d7e36968005049c64cddba9e52abb1fcfae Mon Sep 17 00:00:00 2001 From: "Schaich, Alonso" Date: Fri, 27 Jun 2025 09:13:12 +0900 Subject: [PATCH 4/4] Add dllexport attributes to all exception classes (silverqx/TinyORM#61) --- include/orm/exceptions/domainerror.hpp | 2 +- include/orm/exceptions/invalidformaterror.hpp | 2 +- include/orm/exceptions/invalidtemplateargumenterror.hpp | 2 +- include/orm/exceptions/lostconnectionerror.hpp | 2 +- include/orm/exceptions/multiplerecordsfounderror.hpp | 2 +- include/orm/exceptions/ormerror.hpp | 3 ++- include/orm/exceptions/outofrangeerror.hpp | 2 +- include/orm/exceptions/recordsnotfounderror.hpp | 2 +- include/orm/exceptions/searchpathemptyerror.hpp | 2 +- include/orm/exceptions/sqltransactionerror.hpp | 2 +- 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/orm/exceptions/domainerror.hpp b/include/orm/exceptions/domainerror.hpp index 26a488039..bc2b1ba40 100644 --- a/include/orm/exceptions/domainerror.hpp +++ b/include/orm/exceptions/domainerror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! TinyORM Domain exception. */ - class DomainError : public LogicError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT DomainError : public LogicError // clazy:exclude=copyable-polymorphic { /*! Inherit constructors. */ using LogicError::LogicError; diff --git a/include/orm/exceptions/invalidformaterror.hpp b/include/orm/exceptions/invalidformaterror.hpp index 3efdb9b79..ec07d649c 100644 --- a/include/orm/exceptions/invalidformaterror.hpp +++ b/include/orm/exceptions/invalidformaterror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! TinyORM invalid format exception. */ - class InvalidFormatError : public LogicError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT InvalidFormatError : public LogicError // clazy:exclude=copyable-polymorphic { /*! Inherit constructors. */ using LogicError::LogicError; diff --git a/include/orm/exceptions/invalidtemplateargumenterror.hpp b/include/orm/exceptions/invalidtemplateargumenterror.hpp index 4a4e9753a..3293e64cd 100644 --- a/include/orm/exceptions/invalidtemplateargumenterror.hpp +++ b/include/orm/exceptions/invalidtemplateargumenterror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! TinyORM invalid template argument exception. */ - class InvalidTemplateArgumentError : public InvalidArgumentError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT InvalidTemplateArgumentError : public InvalidArgumentError // clazy:exclude=copyable-polymorphic { /*! Inherit constructors. */ using InvalidArgumentError::InvalidArgumentError; diff --git a/include/orm/exceptions/lostconnectionerror.hpp b/include/orm/exceptions/lostconnectionerror.hpp index b47740558..0555962fd 100644 --- a/include/orm/exceptions/lostconnectionerror.hpp +++ b/include/orm/exceptions/lostconnectionerror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! TinyORM lost connection exception. */ - class LostConnectionError : public LogicError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT LostConnectionError : public LogicError // clazy:exclude=copyable-polymorphic { /*! Inherit constructors. */ using LogicError::LogicError; diff --git a/include/orm/exceptions/multiplerecordsfounderror.hpp b/include/orm/exceptions/multiplerecordsfounderror.hpp index 84f35ea75..efb5b008d 100644 --- a/include/orm/exceptions/multiplerecordsfounderror.hpp +++ b/include/orm/exceptions/multiplerecordsfounderror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! Found more that one record (used by Builder::sole()). */ - class MultipleRecordsFoundError : public RuntimeError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT MultipleRecordsFoundError : public RuntimeError // clazy:exclude=copyable-polymorphic { public: /*! Constructor. */ diff --git a/include/orm/exceptions/ormerror.hpp b/include/orm/exceptions/ormerror.hpp index 7a0b1059a..25429939f 100644 --- a/include/orm/exceptions/ormerror.hpp +++ b/include/orm/exceptions/ormerror.hpp @@ -6,6 +6,7 @@ TINY_SYSTEM_HEADER #include "orm/macros/commonnamespace.hpp" +#include "orm/macros/export.hpp" TINYORM_BEGIN_COMMON_NAMESPACE @@ -13,7 +14,7 @@ namespace Orm::Exceptions { /*! TinyORM exceptions tag, all TinyORM exceptions are derived from this class. */ - class OrmError // NOLINT(cppcoreguidelines-special-member-functions) clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT OrmError // NOLINT(cppcoreguidelines-special-member-functions) clazy:exclude=copyable-polymorphic { public: /*! Pure virtual destructor. */ diff --git a/include/orm/exceptions/outofrangeerror.hpp b/include/orm/exceptions/outofrangeerror.hpp index 638d114ef..fd9e3bec1 100644 --- a/include/orm/exceptions/outofrangeerror.hpp +++ b/include/orm/exceptions/outofrangeerror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! TinyDrivers out of range exception. */ - class OutOfRangeError : public LogicError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT OutOfRangeError : public LogicError // clazy:exclude=copyable-polymorphic { /*! Inherit constructors. */ using LogicError::LogicError; diff --git a/include/orm/exceptions/recordsnotfounderror.hpp b/include/orm/exceptions/recordsnotfounderror.hpp index 921498f8d..614d4e28c 100644 --- a/include/orm/exceptions/recordsnotfounderror.hpp +++ b/include/orm/exceptions/recordsnotfounderror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! Found zero records (used by Builder::sole()). */ - class RecordsNotFoundError : public RuntimeError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT RecordsNotFoundError : public RuntimeError // clazy:exclude=copyable-polymorphic { /*! Inherit constructors. */ using RuntimeError::RuntimeError; diff --git a/include/orm/exceptions/searchpathemptyerror.hpp b/include/orm/exceptions/searchpathemptyerror.hpp index babd971ed..050c24862 100644 --- a/include/orm/exceptions/searchpathemptyerror.hpp +++ b/include/orm/exceptions/searchpathemptyerror.hpp @@ -13,7 +13,7 @@ namespace Orm::Exceptions { /*! The PostgreSQL 'search_path' is empty exception (TinyORM). */ - class SearchPathEmptyError : public InvalidArgumentError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT SearchPathEmptyError : public InvalidArgumentError // clazy:exclude=copyable-polymorphic { /*! Inherit constructors. */ using InvalidArgumentError::InvalidArgumentError; diff --git a/include/orm/exceptions/sqltransactionerror.hpp b/include/orm/exceptions/sqltransactionerror.hpp index a4d3292f5..7499f8ff0 100644 --- a/include/orm/exceptions/sqltransactionerror.hpp +++ b/include/orm/exceptions/sqltransactionerror.hpp @@ -14,7 +14,7 @@ namespace Orm::Exceptions /*! TinyORM Sql transaction exception. TinyOrm library compiled against the TinyDrivers doesn't use this exception class. */ - class SqlTransactionError : public SqlError // clazy:exclude=copyable-polymorphic + class TINYORM_EXPORT SqlTransactionError : public SqlError // clazy:exclude=copyable-polymorphic { /*! Inherit constructors. */ using SqlError::SqlError; // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)