X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/48f46e76198d52242d85b84dae45a70597931088..32892d0df7206a7c14ace5a13f985df1e0a9249a:/include/xbt/exception.hpp diff --git a/include/xbt/exception.hpp b/include/xbt/exception.hpp index 65b0990aaf..4036734664 100644 --- a/include/xbt/exception.hpp +++ b/include/xbt/exception.hpp @@ -24,15 +24,6 @@ namespace simgrid { namespace xbt { -/** A backtrace - * - * This is used (among other things) in exceptions to store the associated - * backtrace. - * - * @ingroup XBT_ex - */ -typedef std::vector Backtrace; - /** The location of where an exception has been thrown * * This is a tuple (__FILE__, __LINE__, __func__) and can be created with @@ -59,19 +50,19 @@ class ThrowPoint { * This is a base class for exceptions which store additional contextual * information: backtrace, throw point, simulated process name, PID, etc. */ -class XBT_PUBLIC WithContextException { +class XBT_PUBLIC ContextedException { public: - WithContextException() : + ContextedException() : backtrace_(simgrid::xbt::backtrace()), procname_(xbt_procname()), pid_(xbt_getpid()) {} - explicit WithContextException(Backtrace bt) : backtrace_(std::move(bt)), procname_(xbt_procname()), pid_(xbt_getpid()) + explicit ContextedException(Backtrace bt) : backtrace_(std::move(bt)), procname_(xbt_procname()), pid_(xbt_getpid()) {} - explicit WithContextException(ThrowPoint throwpoint, Backtrace bt) + explicit ContextedException(ThrowPoint throwpoint, Backtrace bt) : backtrace_(std::move(bt)), procname_(xbt_procname()), pid_(xbt_getpid()), throwpoint_(throwpoint) {} - virtual ~WithContextException(); + virtual ~ContextedException(); Backtrace const& backtrace() const { return backtrace_;