diff --git a/crlcore/src/pyCRL/PyAcmSigda.cpp b/crlcore/src/pyCRL/PyAcmSigda.cpp index ce914cb6..fb314fed 100644 --- a/crlcore/src/pyCRL/PyAcmSigda.cpp +++ b/crlcore/src/pyCRL/PyAcmSigda.cpp @@ -29,6 +29,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/crlcore/src/pyCRL/PyAllianceFramework.cpp b/crlcore/src/pyCRL/PyAllianceFramework.cpp index 7115f6cf..a2011e2b 100644 --- a/crlcore/src/pyCRL/PyAllianceFramework.cpp +++ b/crlcore/src/pyCRL/PyAllianceFramework.cpp @@ -34,6 +34,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Hurricane::DataBase; diff --git a/crlcore/src/pyCRL/PyBanner.cpp b/crlcore/src/pyCRL/PyBanner.cpp index cff665bb..6dd4a796 100644 --- a/crlcore/src/pyCRL/PyBanner.cpp +++ b/crlcore/src/pyCRL/PyBanner.cpp @@ -29,8 +29,10 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; + using Hurricane::Exception; using Isobar::ProxyProperty; using Isobar::ProxyError; using Isobar::ConstructorError; diff --git a/crlcore/src/pyCRL/PyBlif.cpp b/crlcore/src/pyCRL/PyBlif.cpp index 384aae39..8182e3a1 100644 --- a/crlcore/src/pyCRL/PyBlif.cpp +++ b/crlcore/src/pyCRL/PyBlif.cpp @@ -29,6 +29,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/crlcore/src/pyCRL/PyCRL.cpp b/crlcore/src/pyCRL/PyCRL.cpp index 407e6306..1a13a028 100644 --- a/crlcore/src/pyCRL/PyCRL.cpp +++ b/crlcore/src/pyCRL/PyCRL.cpp @@ -40,6 +40,8 @@ namespace CRL { using std::endl; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/crlcore/src/pyCRL/PyCatalogState.cpp b/crlcore/src/pyCRL/PyCatalogState.cpp index e8c33bed..6ac01a37 100644 --- a/crlcore/src/pyCRL/PyCatalogState.cpp +++ b/crlcore/src/pyCRL/PyCatalogState.cpp @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2010-2010, All Rights Reserved +// Copyright (c) UPMC 2010-2016, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | Alliance / Hurricane Interface | // | | @@ -17,10 +11,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./PyCatalogState.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #include "hurricane/isobar/PyCell.h" @@ -37,6 +28,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/crlcore/src/pyCRL/PyCellGauge.cpp b/crlcore/src/pyCRL/PyCellGauge.cpp index fa50c676..8fda554f 100644 --- a/crlcore/src/pyCRL/PyCellGauge.cpp +++ b/crlcore/src/pyCRL/PyCellGauge.cpp @@ -28,6 +28,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/crlcore/src/pyCRL/PyEnvironment.cpp b/crlcore/src/pyCRL/PyEnvironment.cpp index 645a2137..de41ae4d 100644 --- a/crlcore/src/pyCRL/PyEnvironment.cpp +++ b/crlcore/src/pyCRL/PyEnvironment.cpp @@ -28,6 +28,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/crlcore/src/pyCRL/PyIspd05.cpp b/crlcore/src/pyCRL/PyIspd05.cpp index ffafba24..c91feb5b 100644 --- a/crlcore/src/pyCRL/PyIspd05.cpp +++ b/crlcore/src/pyCRL/PyIspd05.cpp @@ -30,6 +30,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/crlcore/src/pyCRL/PyRoutingGauge.cpp b/crlcore/src/pyCRL/PyRoutingGauge.cpp index 4d155bd7..e7516107 100644 --- a/crlcore/src/pyCRL/PyRoutingGauge.cpp +++ b/crlcore/src/pyCRL/PyRoutingGauge.cpp @@ -31,6 +31,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp b/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp index ccf2fe4e..247cc4f1 100644 --- a/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp +++ b/crlcore/src/pyCRL/PyRoutingLayerGauge.cpp @@ -29,6 +29,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/crlcore/src/pyCRL/PyToolBox.cpp b/crlcore/src/pyCRL/PyToolBox.cpp index 6ef322b0..f43ed29e 100644 --- a/crlcore/src/pyCRL/PyToolBox.cpp +++ b/crlcore/src/pyCRL/PyToolBox.cpp @@ -36,6 +36,8 @@ namespace CRL { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Isobar::ProxyProperty; diff --git a/etesian/src/PyEtesianEngine.cpp b/etesian/src/PyEtesianEngine.cpp index f9b00427..35435d9b 100644 --- a/etesian/src/PyEtesianEngine.cpp +++ b/etesian/src/PyEtesianEngine.cpp @@ -36,6 +36,8 @@ namespace Etesian { using Hurricane::tab; using Hurricane::trace_on; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Hurricane::ExceptionWidget; diff --git a/hurricane/src/hurricane/hurricane/Bug.h b/hurricane/src/hurricane/hurricane/Bug.h index e761ba0d..e71095b6 100644 --- a/hurricane/src/hurricane/hurricane/Bug.h +++ b/hurricane/src/hurricane/hurricane/Bug.h @@ -19,12 +19,7 @@ // License along with Hurricane. If not, see // . // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | H U R R I C A N E | // | V L S I B a c k e n d D a t a - B a s e | // | | @@ -32,14 +27,11 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Header : "./hurricane/Bug.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -# ifndef __HURRICANE_BUG__ -# define __HURRICANE_BUG__ +#ifndef HURRICANE_BUG_H +#define HURRICANE_BUG_H # include "hurricane/Exception.h" @@ -75,7 +67,7 @@ namespace Hurricane { inline int Bug::getCode () const { return _code; } -} // End of Hurricane namespace. +} // Hurricane namespace. GETSTRING_POINTER_SUPPORT(Hurricane::Bug); @@ -84,4 +76,4 @@ IOSTREAM_POINTER_SUPPORT(Hurricane::Bug); IOSTREAM_VALUE_SUPPORT(Hurricane::Bug); -# endif // __HURRICANE_BUG__ +#endif // HURRICANE_BUG_H diff --git a/hurricane/src/hurricane/hurricane/Warning.h b/hurricane/src/hurricane/hurricane/Warning.h index 373267f0..677826db 100644 --- a/hurricane/src/hurricane/hurricane/Warning.h +++ b/hurricane/src/hurricane/hurricane/Warning.h @@ -19,12 +19,7 @@ // License along with Hurricane. If not, see // . // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | H U R R I C A N E | // | V L S I B a c k e n d D a t a - B a s e | // | | @@ -32,14 +27,11 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Header : "./hurricane/Warning.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -# ifndef __HURRICANE_WARNING__ -# define __HURRICANE_WARNING__ +# ifndef HURRICANE_WARNING_H +# define HURRICANE_WARNING_H #include "hurricane/Exception.h" @@ -76,7 +68,7 @@ namespace Hurricane { inline int Warning::getCode () const { return _code; } -} // End of Hurricane namespace. +} // Hurricane namespace. GETSTRING_POINTER_SUPPORT(Hurricane::Warning); @@ -85,4 +77,4 @@ IOSTREAM_POINTER_SUPPORT(Hurricane::Warning); IOSTREAM_VALUE_SUPPORT(Hurricane::Warning); -# endif // __HURRICANE_WARNING__ +#endif // HURRICANE_WARNING_H diff --git a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h index c4f105fe..a5c53a57 100644 --- a/hurricane/src/isobar/hurricane/isobar/PyHurricane.h +++ b/hurricane/src/isobar/hurricane/isobar/PyHurricane.h @@ -28,6 +28,7 @@ #include #include #include +#include "hurricane/Bug.h" #include "hurricane/Error.h" #include "hurricane/Warning.h" #include "hurricane/isobar/ProxyProperty.h" @@ -1408,6 +1409,16 @@ extern "C" { PyErr_SetString ( HurricaneError, message.c_str() ); \ return NULL; \ } \ + catch ( const Bug& e ) { \ + std::string message = "\n" + getString(e); \ + PyErr_SetString ( HurricaneError, message.c_str() ); \ + return NULL; \ + } \ + catch ( const Exception& e ) { \ + std::string message = "\nUnknown Hurricane::Exception"; \ + PyErr_SetString ( HurricaneError, message.c_str() ); \ + return NULL; \ + } \ catch ( const std::exception& e ) { \ std::string message = "\n" + std::string(e.what()); \ PyErr_SetString ( HurricaneError, message.c_str() ); \ @@ -1416,7 +1427,7 @@ extern "C" { catch ( ... ) { \ std::string message = \ "\nUnmanaged exception, neither a Hurricane::Error nor" \ - "std::exception."; \ + " a std::exception."; \ PyErr_SetString ( HurricaneError, message.c_str() ); \ return NULL; \ } \ diff --git a/hurricane/src/viewer/ExceptionWidget.cpp b/hurricane/src/viewer/ExceptionWidget.cpp index 6c22f7c1..a29d70b7 100644 --- a/hurricane/src/viewer/ExceptionWidget.cpp +++ b/hurricane/src/viewer/ExceptionWidget.cpp @@ -28,6 +28,7 @@ #include #include #include +#include "hurricane/Bug.h" #include "hurricane/Error.h" #include "hurricane/Exception.h" #include "hurricane/viewer/Graphics.h" @@ -71,6 +72,9 @@ namespace Hurricane { method(); failure = false; } + catch ( Bug& e ) { + ExceptionWidget::run( e ); + } catch ( Error& e ) { ExceptionWidget::run( e ); } diff --git a/hurricane/src/viewer/HApplication.cpp b/hurricane/src/viewer/HApplication.cpp index 24e69728..bdd5bf8f 100644 --- a/hurricane/src/viewer/HApplication.cpp +++ b/hurricane/src/viewer/HApplication.cpp @@ -16,6 +16,7 @@ #include #include +#include "hurricane/Bug.h" #include "hurricane/Error.h" #include "hurricane/viewer/Graphics.h" #include "hurricane/viewer/ExceptionWidget.h" @@ -67,6 +68,9 @@ namespace Hurricane { try { return QApplication::notify( object, event ); } + catch ( Bug& e ) { + ExceptionWidget::run( e ); + } catch ( Error& e ) { ExceptionWidget::run( e ); } diff --git a/katabatic/src/LoadGrByNet.cpp b/katabatic/src/LoadGrByNet.cpp index 1fdb56f8..b9c216a4 100644 --- a/katabatic/src/LoadGrByNet.cpp +++ b/katabatic/src/LoadGrByNet.cpp @@ -658,12 +658,12 @@ namespace { void _do_xG_xM3 (); private: - enum ConnexityBits { GlobalBSize = 3 - , Metal1BSize = 3 - , Metal2BSize = 3 - , Metal3BSize = 3 - , PadsBSize = 3 - , PinsBSize = 3 + enum ConnexityBits { GlobalBSize = 4 + , Metal1BSize = 4 + , Metal2BSize = 4 + , Metal3BSize = 4 + , PadsBSize = 4 + , PinsBSize = 4 }; #define CONNEXITY_VALUE( Gs, M1s, M2s, M3s, pads, pins ) \ @@ -683,6 +683,7 @@ namespace { , Conn_1G_2M1 = CONNEXITY_VALUE( 1, 2, 0, 0, 0 , 0 ) , Conn_1G_3M1 = CONNEXITY_VALUE( 1, 3, 0, 0, 0 , 0 ) , Conn_1G_4M1 = CONNEXITY_VALUE( 1, 4, 0, 0, 0 , 0 ) + , Conn_1G_5M1 = CONNEXITY_VALUE( 1, 5, 0, 0, 0 , 0 ) , Conn_1G_1M2 = CONNEXITY_VALUE( 1, 0, 1, 0, 0 , 0 ) , Conn_1G_2M2 = CONNEXITY_VALUE( 1, 0, 2, 0, 0 , 0 ) , Conn_1G_3M2 = CONNEXITY_VALUE( 1, 0, 3, 0, 0 , 0 ) @@ -823,6 +824,16 @@ namespace { _net = fromSegment->getNet(); forEach ( Hook*, hook, fromHook->getHooks() ) { + ltrace(99) << "Topology [" << _connexity.connexity << "] = " + << "[" << _connexity.fields.globals + << "+" << _connexity.fields.M1 + << "+" << _connexity.fields.M2 + << "+" << _connexity.fields.M3 + << "+" << _connexity.fields.Pin + << "+" << _connexity.fields.Pad + << "] " << _gcell + << endl; + Segment* toSegment = dynamic_cast( hook->getComponent() ); if (toSegment) { @@ -923,7 +934,8 @@ namespace { case Conn_1G_1M1: _do_1G_1M1(); break; case Conn_1G_2M1: case Conn_1G_3M1: - case Conn_1G_4M1: _do_1G_xM1(); break; + case Conn_1G_4M1: + case Conn_1G_5M1: _do_1G_xM1(); break; case Conn_1G_1M2: case Conn_1G_2M2: case Conn_1G_3M2: diff --git a/kite/src/PyKiteEngine.cpp b/kite/src/PyKiteEngine.cpp index 05144361..0323e55d 100644 --- a/kite/src/PyKiteEngine.cpp +++ b/kite/src/PyKiteEngine.cpp @@ -36,6 +36,8 @@ namespace Kite { using std::ostringstream; using Hurricane::tab; using Hurricane::in_trace; + using Hurricane::Exception; + using Hurricane::Bug; using Hurricane::Error; using Hurricane::Warning; using Hurricane::ExceptionWidget; diff --git a/unicorn/src/CgtMain.cpp b/unicorn/src/CgtMain.cpp index b4dbecd6..8afc0c5a 100644 --- a/unicorn/src/CgtMain.cpp +++ b/unicorn/src/CgtMain.cpp @@ -29,6 +29,7 @@ namespace bopts = boost::program_options; #include "hurricane/DebugSession.h" #include "hurricane/DataBase.h" #include "hurricane/Cell.h" +#include "hurricane/Bug.h" #include "hurricane/Warning.h" #include "hurricane/UpdateSession.h" #include "hurricane/viewer/Script.h" @@ -435,6 +436,10 @@ int main ( int argc, char *argv[] ) if ( not destroyDatabase ) exit ( 0 ); cmess1 << " o Full database deletion (may be buggy)." << endl; } + catch ( Bug& e ) { + cerr << e.what() << endl; + exit ( 1 ); + } catch ( Error& e ) { cerr << e.what() << endl; cerr << "\nProgram stack:\n" << e.where() << endl;