From 40f70ac929072b4da2b2269f79cc6c77a3dc0abc Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 14 Oct 2014 19:17:11 +0400 Subject: [PATCH] 0025371: Visualization - raise exception in AIS_ConnectedInteractive::Connect() on invalid argument Indicate API misuse by program exception. --- src/AIS/AIS_ConnectedInteractive.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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()) {