- VISU_Actor* newAct = VISU::FindActor( wnd, thePrs );
- if( !newAct )
- {
- newAct = thePrs->CreateActor();
+ VISU_Actor* newAct = VISU::FindActor(wnd, thePrs);
+ if (!newAct) {
+ try {
+ newAct = thePrs->CreateActor();
+ } catch (std::runtime_error& exc) {
+ thePrs->RemoveActors();
+
+ INFOS(exc.what());
+ SUIT_MessageBox::warn1
+ (myApp->desktop(), QObject::tr("WRN_VISU"),
+ QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()),
+ QObject::tr("BUT_OK"));
+ }