|Anonymous | Login | Signup for a new account||2020-08-06 09:41 EDT|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000287||JANA||Feature Request||public||2012-09-24 07:05||2012-09-24 07:48|
|Summary||0000287: Add catch for std::exception to JFactory::Get|
|Description||This comes from Paul. Here is the original e-mail:|
In JFactory<T>::Get(vector<const T*> &d), could you please add catch statements for "std" exceptions (and set the busy flag to zero there too!). If nothing else it helps me track down where std::bad_alloc is thrown from by looking at the factory call stack.
Also, and this may be a bad idea, but maybe if the framework could call JApplication::RootUnLock() (and any other unlocks) when an exception was thrown, it would help trying to recover from them.
|Tags||No tags attached.|
Modified the catch statements in JFactory.h to catch std::exception instead. Since JException inherits from std::exception, it will be caught as well.
Committed in revision 1053. This will appear in JANA 0.6.6
|We cannot unlock all mutexes in the catch block because we don't know if they are locked or who holds them and most importantly, if they will be unlocked after we return. Unlocking a mutex you do not own is "undefined" according to the pthreads documentation. Unlocking twice and unlocking an un-locked or un-owned mutex would all lead to undefined behavior.|
|2012-09-24 07:05||davidl||New Issue|
|2012-09-24 07:45||davidl||Note Added: 0000441|
|2012-09-24 07:45||davidl||Status||new => resolved|
|2012-09-24 07:45||davidl||Resolution||open => fixed|
|2012-09-24 07:45||davidl||Assigned To||=> davidl|
|2012-09-24 07:48||davidl||Note Added: 0000442|
|Copyright © 2000 - 2020 MantisBT Team|