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
Don't leave an empty catch block.
[simgrid.git]
/
src
/
xbt
/
exception.cpp
diff --git
a/src/xbt/exception.cpp
b/src/xbt/exception.cpp
index
4fd03bc
..
6d9272f
100644
(file)
--- a/
src/xbt/exception.cpp
+++ b/
src/xbt/exception.cpp
@@
-65,7
+65,6
@@
const char* xbt_ex_catname(xbt_errcat_t cat)
default:
return "INVALID ERROR";
}
default:
return "INVALID ERROR";
}
- return "INVALID ERROR";
}
namespace simgrid {
}
namespace simgrid {
@@
-106,6
+105,7
@@
void log_exception(e_xbt_log_priority_t prio, const char* context, std::exceptio
}
catch (...) {
// Don't log exceptions we got when trying to log exception
}
catch (...) {
// Don't log exceptions we got when trying to log exception
+ XBT_LOG(prio, "Ignoring exception caught while while trying to log an exception!");
}
}
}
}
@@
-146,8
+146,9
@@
static void handler()
std::abort();
}
std::abort();
}
- catch (simgrid::kernel::context::Context::StopRequest& e) {
- XBT_ERROR("Received a StopRequest at the top-level exception handler. Maybe a Java->C++ call that is not protected "
+ catch (const simgrid::ForcefulKillException&) {
+ XBT_ERROR("Received a ForcefulKillException at the top-level exception handler. Maybe a Java->C++ call that is not "
+ "protected "
"in a try/catch?");
show_backtrace(bt);
}
"in a try/catch?");
show_backtrace(bt);
}
@@
-172,15
+173,6
@@
void install_exception_handler()
previous_terminate_handler = std::set_terminate(handler);
});
}
previous_terminate_handler = std::set_terminate(handler);
});
}
-// deprecated
-void logException(e_xbt_log_priority_t priority, const char* context, std::exception const& exception)
-{
- log_exception(priority, context, exception);
-}
-void installExceptionHandler()
-{
- install_exception_handler();
-}
} // namespace xbt
} // namespace simgrid
} // namespace xbt
} // namespace simgrid