-// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
#include <sstream>
#include <stdlib.h>
-//#define MYDEBUG
+#include "utilities.h"
Engines_DSC_interface::Engines_DSC_interface() {}
Engines::DSC::BadPortType BPT;
BPT.expected = CORBA::string_dup("Expected a uses port");
BPT.received = CORBA::string_dup((std::string("Received a provides/none port : ")+uses_port_name).c_str());
-#ifdef MYDEBUG
- std::cout << "---- DSC_Interface : MARK 1 ---- exception : " << uses_port_name << "----" << std::endl;
-#endif
+
+ if (SALOME::VerbosityActivated())
+ std::cout << "---- DSC_Interface : MARK 1 ---- exception : " << uses_port_name << "----" << std::endl;
+
throw BPT;
}
rtn_port = new Engines::DSC::uses_port(my_ports[uses_port_name]->uses_port_refs);
}
else
- {
-#ifdef MYDEBUG
- std::cout << "---- DSC_Interface : MARK 2 ---- exception : " << uses_port_name << "----" << std::endl;
-#endif
+ {
+ if (SALOME::VerbosityActivated())
+ std::cout << "---- DSC_Interface : MARK 2 ---- exception : " << uses_port_name << "----" << std::endl;
+
throw Engines::DSC::PortNotConnected();
- }
+ }
return rtn_port;
}