return backtrace_;
}
int pid() const { return pid_; }
- std::string const& processName() const { return procname_; }
- ThrowPoint& throwPoint() { return throwpoint_; }
+ std::string const& process_name() const { return procname_; }
+ ThrowPoint& throw_point() { return throwpoint_; }
+
+ // deprecated
+ XBT_ATTRIB_DEPRECATED_v323("Please use WithContextException::process_name()") std::string const& processName() const
+ {
+ return process_name();
+ }
+ XBT_ATTRIB_DEPRECATED_v323("Please use WithContextException::throw_point()") ThrowPoint& throwPoint()
+ {
+ return throw_point();
+ }
+
private:
Backtrace backtrace_;
std::string procname_; /**< Name of the process who thrown this */
void xbt_test_exception(xbt_ex_t e)
{
- _xbt_test_fail(e.throwPoint().file, e.throwPoint().line, "Exception %s raised: %s", xbt_ex_catname(e.category), e.what());
+ _xbt_test_fail(e.throw_point().file, e.throw_point().line, "Exception %s raised: %s", xbt_ex_catname(e.category),
+ e.what());
}
void xbt_test_expect_failure()
auto* with_context = dynamic_cast<const simgrid::xbt::WithContextException*>(&exception);
if (with_context != nullptr)
- XBT_LOG(prio, "%s %s by %s/%d: %s",
- context, name.get(),
- with_context->processName().c_str(), with_context->pid(),
- exception.what());
+ XBT_LOG(prio, "%s %s by %s/%d: %s", context, name.get(), with_context->process_name().c_str(),
+ with_context->pid(), exception.what());
else
XBT_LOG(prio, "%s %s: %s", context, name.get(), exception.what());