class ThrowPoint {
public:
ThrowPoint() = default;
- ThrowPoint(const char* file, int line, const char* function) :
- file(file), line(line), function(function) {}
+ explicit ThrowPoint(const char* file, int line, const char* function) : file(file), line(line), function(function) {}
const char* file = nullptr;
int line = 0;
const char* function = nullptr;
procname_(xbt_procname()),
pid_(xbt_getpid())
{}
- WithContextException(Backtrace bt) :
- backtrace_(std::move(bt)),
- procname_(xbt_procname()),
- pid_(xbt_getpid())
+ explicit WithContextException(Backtrace bt) : backtrace_(std::move(bt)), procname_(xbt_procname()), pid_(xbt_getpid())
{}
- WithContextException(ThrowPoint throwpoint, Backtrace bt) :
- backtrace_(std::move(bt)),
- procname_(xbt_procname()),
- pid_(xbt_getpid()),
- throwpoint_(throwpoint)
+ explicit WithContextException(ThrowPoint throwpoint, Backtrace bt)
+ : backtrace_(std::move(bt)), procname_(xbt_procname()), pid_(xbt_getpid()), throwpoint_(throwpoint)
{}
virtual ~WithContextException();
Backtrace const& backtrace() const
WithContext(E exception, WithContextException context) :
E(std::move(exception)),
WithContextException(std::move(context)) {}
- ~WithContext() override {}
+ ~WithContext() override = default;
};
/** Throw a C++ exception with some context