Skip to content

Commit

Permalink
Remove Error::msg() functions
Browse files Browse the repository at this point in the history
This removes the anti-pattern of string-ly carrying the context.
The context needs to be built with boost exception tags instead.

Issue #219
  • Loading branch information
rakhimov committed Oct 15, 2017
1 parent b11db50 commit 442b788
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,6 @@ class Error : virtual public std::exception, virtual public boost::exception {
/// @returns The formatted error message to be printed.
const char* what() const noexcept final { return msg_.c_str(); }

/// @returns The core message describing the error.
const std::string& msg() const { return msg_; }

/// Sets the error messages.
///
/// @param[in] msg The error message.
void msg(std::string msg) { msg_ = std::move(msg); }

private:
std::string msg_; ///< The error message.
};
Expand Down

0 comments on commit 442b788

Please sign in to comment.