X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ecd5f7562caf1d443bf22788fa5f4fac408776ec..1b69fabbaddeda90a9065f31ef30fb8f22ad4105:/include/xbt/exception.hpp diff --git a/include/xbt/exception.hpp b/include/xbt/exception.hpp index 3d648a1b65..544f6ae247 100644 --- a/include/xbt/exception.hpp +++ b/include/xbt/exception.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2005-2017. The SimGrid Team.All rights reserved. */ +/* Copyright (c) 2005-2018. The SimGrid Team.All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -65,7 +65,7 @@ class ThrowPoint { * However, you can try `dynamic_cast` an exception to this type in order to * get contextual information about the exception. */ -XBT_PUBLIC_CLASS WithContextException { +class XBT_PUBLIC WithContextException { public: WithContextException() : backtrace_(simgrid::xbt::backtrace()), @@ -83,8 +83,19 @@ public: 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 */