-// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
+// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
/*
File MedException.cxx
char* duplicate( const char *const str ) ;
char* duplicate( const char *const str )
{
- ASSERT(str!=NULL) ;
+ ASSERT_MED(str!=NULL) ;
const size_t length = strlen( str ) ;
- ASSERT(length>0) ;
+ ASSERT_MED(length>0) ;
char *new_str = new char[ 1+length ] ;
- ASSERT(new_str) ;
+ ASSERT_MED(new_str) ;
strcpy( new_str , str ) ;
return new_str ;
}
MEDEXCEPTION::MEDEXCEPTION( void ): exception() , _text(0)
// ------------------------------------------------------ //
{
- MESSAGE( "You must user the standard builder : MEDEXCEPTION::MEDEXCEPTION( const char *text )" ) ;
- INTERRUPTION(1) ;
+ MESSAGE_MED( "You must user the standard builder : MEDEXCEPTION::MEDEXCEPTION( const char *text )" ) ;
+ INTERRUPTION_MED(1) ;
}
{
char *newText = 0 ;
- ASSERT(text) ;
+ ASSERT_MED(text) ;
const size_t l1 = strlen(text) ;
const char* prefix = "MED Exception" ;
{
const size_t l2 = strlen(fileName) ;
- ASSERT(lineNumber>=1) ;
+ ASSERT_MED(lineNumber>=1) ;
const size_t l3 = 1+int(log10(float(lineNumber))) ;
const size_t l4 = l0+l1+l2+l3+10+1 ;
newText = new char [ l4 ] ;
sprintf( newText , "%s in %s [%u] : %s" , prefix, fileName, lineNumber, text ) ;
- ASSERT(newText[l4-1] == '\0' );
+ ASSERT_MED(newText[l4-1] == '\0' );
}
else
newText = new char [ l0+l1+3+1 ] ;
sprintf( newText , "%s : %s" , prefix, text ) ;
}
- ASSERT(newText) ;
+ ASSERT_MED(newText) ;
return newText ;
}
exception(), _text( makeText( text , fileName , lineNumber ) )
// ------------------------------------------------------------------------------------------------ //
{
- MESSAGE(_text);
+ MESSAGE_MED(_text);
}
/*!
delete [] _text ;
_text = 0 ;
}
- ASSERT(_text==NULL) ;
+ ASSERT_MED(_text==NULL) ;
}