Skip to content

Commit

Permalink
Derive Error from boost::exception
Browse files Browse the repository at this point in the history
This uses virtual inheritance to derive from std::exception as well.

Issue #219
  • Loading branch information
rakhimov committed Oct 15, 2017
1 parent 14a7cbd commit 53ae0cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
#include <exception>
#include <string>

#include <boost/exception/exception.hpp>

namespace scram {

/// The Error class is the base class
/// for common exceptions specific to the SCRAM code.
class Error : public std::exception {
class Error : virtual public std::exception, virtual public boost::exception {
public:
/// Constructs a new error with a provided message.
///
Expand Down

0 comments on commit 53ae0cc

Please sign in to comment.