Skip to content

Add dllexport attributes to exception classes #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/orm/exceptions/domainerror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/invalidargumenterror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/invalidformaterror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/invalidtemplateargumenterror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/lostconnectionerror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/multiplecolumnsselectederror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/multiplerecordsfounderror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
3 changes: 2 additions & 1 deletion include/orm/exceptions/ormerror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
TINY_SYSTEM_HEADER

#include "orm/macros/commonnamespace.hpp"
#include "orm/macros/export.hpp"

TINYORM_BEGIN_COMMON_NAMESPACE

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. */
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/outofrangeerror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/recordsnotfounderror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/searchpathemptyerror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/sqlitedatabasedoesnotexisterror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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). */
Expand Down
2 changes: 1 addition & 1 deletion include/orm/exceptions/sqltransactionerror.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down