A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sonar: remove unused type declaration
[simgrid.git]
/
include
/
xbt
/
ex.hpp
diff --git
a/include/xbt/ex.hpp
b/include/xbt/ex.hpp
index
c1dcfb8
..
efd8eee
100644
(file)
--- a/
include/xbt/ex.hpp
+++ b/
include/xbt/ex.hpp
@@
-48,20
+48,22
@@
#include <xbt/ex.h>
#include <xbt/ex.h>
-/**
(Deprecated) Generic
exception
+/**
A legacy
exception
*
*
- * An error is defined by a category and a value within that category.
+ * It is defined by a category and a value within that category (as well as
+ * an optional error message).
*
* This used to be a structure for C exceptions but it has been retrofitted
* as a C++ exception and some of its data has been moved in the
*
* This used to be a structure for C exceptions but it has been retrofitted
* as a C++ exception and some of its data has been moved in the
- * WithContextException base class. We should deprecate it and replace it
+ *
@ref
WithContextException base class. We should deprecate it and replace it
* with either C++ different exceptions or `std::system_error` which already
* provides this (category + error code) logic.
* with either C++ different exceptions or `std::system_error` which already
* provides this (category + error code) logic.
+ *
+ * @ingroup XBT_ex_c
*/
struct XBT_PUBLIC() xbt_ex :
*/
struct XBT_PUBLIC() xbt_ex :
- public std::runtime_error,
- public simgrid::xbt::WithContextException {
-public:
+ std::runtime_error,
+ simgrid::xbt::WithContextException {
xbt_ex() :
std::runtime_error("")
xbt_ex() :
std::runtime_error("")
@@
-77,13
+79,13
@@
public:
simgrid::xbt::WithContextException(throwpoint, simgrid::xbt::backtrace())
{}
simgrid::xbt::WithContextException(throwpoint, simgrid::xbt::backtrace())
{}
- ~xbt_ex()
override
;
+ ~xbt_ex()
= default
;
/** Category (what went wrong) */
/** Category (what went wrong) */
- xbt_errcat_t category;
+ xbt_errcat_t category
= unknown_error
;
/** Why did it went wrong */
/** Why did it went wrong */
- int value;
+ int value
= 0
;
};
};