diff --git a/src/exceptions/FileIoException.h b/src/exceptions/FileIoException.h index 6ae8a9fb8..0d31af7fd 100644 --- a/src/exceptions/FileIoException.h +++ b/src/exceptions/FileIoException.h @@ -14,15 +14,7 @@ namespace mrmc { namespace exceptions { -class FileIoException : public BaseException { -public: - FileIoException() : BaseException() { - } - FileIoException(const char* cstr) : BaseException(cstr) { - } - FileIoException(const FileIoException& cp) : BaseException(cp) { - } -}; +MRMC_EXCEPTION_DEFINE_NEW(FileIoException) } diff --git a/src/exceptions/InvalidArgumentException.h b/src/exceptions/InvalidArgumentException.h index c25c31fd9..c6c07e68a 100644 --- a/src/exceptions/InvalidArgumentException.h +++ b/src/exceptions/InvalidArgumentException.h @@ -10,15 +10,7 @@ namespace exceptions { /*! * @brief This exception is thrown when a parameter is invalid in this context */ -class InvalidArgumentException : public BaseException { -public: - InvalidArgumentException() { - } - InvalidArgumentException(const char* cstr) : BaseException(cstr) { - } - InvalidArgumentException(const InvalidArgumentException& cp) : BaseException(cp) { - } -}; +MRMC_EXCEPTION_DEFINE_NEW(InvalidArgumentException) } // namespace exceptions diff --git a/src/exceptions/InvalidSettingsException.h b/src/exceptions/InvalidSettingsException.h index cd51fa549..a399d82ae 100644 --- a/src/exceptions/InvalidSettingsException.h +++ b/src/exceptions/InvalidSettingsException.h @@ -6,15 +6,7 @@ namespace mrmc { namespace exceptions { -class InvalidSettingsException : public BaseException { -public: - InvalidSettingsException() { - } - InvalidSettingsException(const char* cstr) : BaseException(cstr) { - } - InvalidSettingsException(const InvalidSettingsException& cp) : BaseException(cp) { - } -}; +MRMC_EXCEPTION_DEFINE_NEW(InvalidSettingsException) } // namespace exceptions } // namespace mrmc diff --git a/src/exceptions/InvalidStateException.h b/src/exceptions/InvalidStateException.h index 7959e71dc..c971321bf 100644 --- a/src/exceptions/InvalidStateException.h +++ b/src/exceptions/InvalidStateException.h @@ -11,15 +11,7 @@ namespace exceptions { * @brief This exception is thrown when a memory request can't be * fulfilled. */ -class InvalidStateException : public BaseException { -public: - InvalidStateException() { - } - InvalidStateException(const char* cstr) : BaseException(cstr) { - } - InvalidStateException(const InvalidStateException& cp) : BaseException(cp) { - } -}; +MRMC_EXCEPTION_DEFINE_NEW(InvalidStateException) } // namespace exceptions diff --git a/src/exceptions/NoConvergenceException.h b/src/exceptions/NoConvergenceException.h index c67fa54fa..1e7753b1c 100644 --- a/src/exceptions/NoConvergenceException.h +++ b/src/exceptions/NoConvergenceException.h @@ -9,15 +9,7 @@ namespace exceptions { /*! * @brief This exception is thrown when an iterative solver failed to converge with the given maxIterations */ -class NoConvergenceException : public BaseException { -public: - NoConvergenceException() { - } - NoConvergenceException(const char* cstr) : BaseException(cstr) { - } - NoConvergenceException(const NoConvergenceException& cp) : BaseException(cp) { - } -}; +MRMC_EXCEPTION_DEFINE_NEW(NoConvergenceException) } // namespace exceptions } // namespace mrmc diff --git a/src/exceptions/OutOfRangeException.h b/src/exceptions/OutOfRangeException.h index f5b2660b9..decd36fda 100644 --- a/src/exceptions/OutOfRangeException.h +++ b/src/exceptions/OutOfRangeException.h @@ -10,15 +10,7 @@ namespace exceptions { /* * @briefThis exception is thrown when a parameter is not in the range of valid values */ -class OutOfRangeException : public BaseException { -public: - OutOfRangeException() { - } - OutOfRangeException(const char* cstr) : BaseException(cstr) { - } - OutOfRangeException(const OutOfRangeException& cp) : BaseException(cp) { - } -}; +MRMC_EXCEPTION_DEFINE_NEW(OutOfRangeException) } // namespace exceptions diff --git a/src/exceptions/WrongFileFormatException.h b/src/exceptions/WrongFileFormatException.h index 490623440..182660a30 100644 --- a/src/exceptions/WrongFileFormatException.h +++ b/src/exceptions/WrongFileFormatException.h @@ -18,15 +18,7 @@ namespace exceptions { * @brief This exception is thrown when an input file * contains invalid or missing keys. */ -class WrongFileFormatException : public BaseException { -public: - WrongFileFormatException() { - } - WrongFileFormatException(const char* cstr) : BaseException(cstr) { - } - WrongFileFormatException(const WrongFileFormatException& cp) : BaseException(cp) { - } -}; +MRMC_EXCEPTION_DEFINE_NEW(WrongFileFormatException) } //namespace exceptions