From: kgv Date: Tue, 14 Oct 2014 15:17:11 +0000 (+0400) Subject: 0025371: Visualization - raise exception in AIS_ConnectedInteractive::Connect() on... X-Git-Tag: V6_8_0~77 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=40f70ac929072b4da2b2269f79cc6c77a3dc0abc;p=occt-copy.git 0025371: Visualization - raise exception in AIS_ConnectedInteractive::Connect() on invalid argument Indicate API misuse by program exception. --- diff --git a/src/AIS/AIS_ConnectedInteractive.cxx b/src/AIS/AIS_ConnectedInteractive.cxx index 31e3c51f62..f80bdc2adc 100644 --- a/src/AIS/AIS_ConnectedInteractive.cxx +++ b/src/AIS/AIS_ConnectedInteractive.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -86,6 +87,10 @@ void AIS_ConnectedInteractive::Connect (const Handle(AIS_InteractiveObject)& the { myReference = theAnotherObj; } + else + { + Standard_ProgramError::Raise ("AIS_ConnectedInteractive::Connect() - object without own presentation can not be connected"); + } if (!myReference.IsNull()) {