util/Error: use std::exception_ptr instead of std::exception
Necessary to preserve type information. The try/catch sequence didn't
work previously.
Same fix as in commit 1c904000
This commit is contained in:
@@ -81,7 +81,7 @@ try {
|
||||
std::move(reader), info.GetSize(),
|
||||
mutex, cond);
|
||||
} catch (const std::exception &e) {
|
||||
error.Set(e);
|
||||
error.Set(std::current_exception());
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ try {
|
||||
offset = new_offset;
|
||||
return true;
|
||||
} catch (const std::exception &e) {
|
||||
error.Set(e);
|
||||
error.Set(std::current_exception());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ try {
|
||||
offset += nbytes;
|
||||
return nbytes;
|
||||
} catch (const std::exception &e) {
|
||||
error.Set(e);
|
||||
error.Set(std::current_exception());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user