Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
a2bcf6e5
Commit
a2bcf6e5
authored
Oct 02, 2012
by
Michal 'vorner' Vaner
Browse files
[2202] Comment catching of exceptions
parent
408728e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/util/threads/thread.cc
View file @
a2bcf6e5
...
...
@@ -144,7 +144,10 @@ Thread::wait() {
// Was there an exception in the thread?
scoped_ptr
<
UncaughtException
>
ex
;
try
{
// Something in here could in theory throw.
// Something here could in theory throw. But we already terminated the thread, so
// we need to make sure we are in consistent state even in such situation (like
// releasing the mutex and impl_).
try
{
if
(
impl_
->
exception_
)
{
ex
.
reset
(
new
UncaughtException
(
__FILE__
,
__LINE__
,
impl_
->
exception_text_
.
c_str
()));
...
...
@@ -152,6 +155,8 @@ Thread::wait() {
}
catch
(...)
{
Impl
::
done
(
impl_
);
impl_
=
NULL
;
// We have eaten the UncaughtException by now, but there's another
// exception instead, so we have at least something.
throw
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment