Commit 17680628 by Christian Kern

Cannot reference catched excpetion in EMBB_THROW, this will not compile if…

Cannot reference catched excpetion in EMBB_THROW, this will not compile if exceptions are disabled...
parent 6b213d28
...@@ -174,12 +174,14 @@ void MergeSortAllocate( ...@@ -174,12 +174,14 @@ void MergeSortAllocate(
} }
value_type* temporary = static_cast<value_type*>( value_type* temporary = static_cast<value_type*>(
Alloc::Allocate(distance * sizeof(value_type))); Alloc::Allocate(distance * sizeof(value_type)));
EMBB_TRY { EMBB_TRY {
MergeSort(first, last, temporary, comparison, policy, block_size); MergeSort(first, last, temporary, comparison, policy, block_size);
} EMBB_CATCH (embb::base::ErrorException & e) { } EMBB_CATCH (embb::base::ErrorException & e) {
// embb exception handling does not support catch(...) and rethrow yet. // embb exception handling does not support catch(...) and rethrow yet.
Alloc::Free(temporary); Alloc::Free(temporary);
EMBB_THROW(embb::base::ErrorException, e.what()); EMBB_THROW(embb::base::ErrorException, \
"Rethrown exception of type ErrorException");
} }
Alloc::Free(temporary); Alloc::Free(temporary);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment