mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-30 05:26:45 +00:00
feat(GODT-2364): added optional details to C++ exceptions.
This commit is contained in:
@ -31,17 +31,19 @@ namespace bridgepp {
|
||||
//****************************************************************************************************************************************************
|
||||
class Exception : public std::exception {
|
||||
public: // member functions
|
||||
explicit Exception(QString what = QString()) noexcept; ///< Constructor
|
||||
explicit Exception(QString what = QString(), QString details = QString()) noexcept; ///< Constructor
|
||||
Exception(Exception const &ref) noexcept; ///< copy constructor
|
||||
Exception(Exception &&ref) noexcept; ///< copy constructor
|
||||
Exception &operator=(Exception const &) = delete; ///< Disabled assignment operator
|
||||
Exception &operator=(Exception &&) = delete; ///< Disabled assignment operator
|
||||
~Exception() noexcept override = default; ///< Destructor
|
||||
QString const &qwhat() const noexcept; ///< Return the description of the exception as a QString
|
||||
QString qwhat() const noexcept; ///< Return the description of the exception as a QString
|
||||
const char *what() const noexcept override; ///< Return the description of the exception as C style string
|
||||
QString details() const noexcept; ///< Return the details for the exception
|
||||
|
||||
private: // data members
|
||||
QString const what_; ///< The description of the exception
|
||||
QString const what_; ///< The description of the exception.
|
||||
QString const details_; ///< The optional details for the exception.
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user