Attempt to close all UpdateSession after catching an exception.
* New: In Hurricane::UpdateSession, added "reset()" static function to close all the currently opened sessions. * New: In Hurricane::ExceptionWidget::catchAllwrapper(), close all pending UpdateSession if the user choose to resume.
This commit is contained in:
parent
6562792e53
commit
d8fc626678
|
@ -209,6 +209,16 @@ void UpdateSession::close()
|
|||
cdebug_log(18,0) << "UpdateSession::close() - Materialization completed." << endl;
|
||||
}
|
||||
|
||||
void UpdateSession::reset()
|
||||
// ************************
|
||||
{
|
||||
cdebug_log(18,1) << "UpdateSession::reset()" << endl;
|
||||
|
||||
while ( UPDATOR_STACK and not UPDATOR_STACK->empty() ) close();
|
||||
|
||||
cdebug_tabw(18,-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // End of Hurricane namespace.
|
||||
|
|
|
@ -74,6 +74,7 @@ class UpdateSession : public SharedProperty {
|
|||
|
||||
public: static void open();
|
||||
public: static void close();
|
||||
public: static void reset();
|
||||
|
||||
|
||||
};
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "hurricane/Error.h"
|
||||
#include "hurricane/Exception.h"
|
||||
#include "hurricane/TextTranslator.h"
|
||||
#include "hurricane/UpdateSession.h"
|
||||
#include "hurricane/viewer/Graphics.h"
|
||||
#include "hurricane/viewer/ExceptionWidget.h"
|
||||
|
||||
|
@ -97,6 +98,8 @@ namespace Hurricane {
|
|||
|
||||
ExceptionWidget::run( message );
|
||||
}
|
||||
if (failure) UpdateSession::reset();
|
||||
|
||||
return failure;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue