Program: gdcm
Module: $RCSfile: gdcmDebug.cxx,v $
Language: C++
- Date: $Date: 2004/10/12 04:35:44 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2005/01/06 20:03:26 $
+ Version: $Revision: 1.13 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
* @param msg1 first message part
* @param msg2 second message part
*/
-void Debug::Verbose(int level, const char * msg1, const char * msg2)
+void Debug::Verbose(int level, const char *msg1, const char *msg2)
{
if (level > DebugLevel)
{
return ;
}
- std::cerr << msg1 << ' ' << msg2 << std::endl;
+ std::cerr << "gdcm::" << msg1 << ' ' << msg2 << std::endl << std::flush;
}
/**
* @param msg1 first message part
* @param msg2 second message part
*/
-void Debug::Error(bool test, const char * msg1, const char * msg2)
+void Debug::Error(bool test, const char *msg1, const char *msg2)
{
if (!test)
{
return;
}
- std::cerr << msg1 << ' ' << msg2 << std::endl;
+ std::cerr << "gdcm::" << msg1 << ' ' << msg2 << std::endl << std::flush;
Exit(1);
}
* @param msg2 second message part
* @param msg3 Third message part
*/
-void Debug::Error(const char* msg1, const char* msg2,
- const char* msg3)
+void Debug::Error(const char *msg1, const char *msg2,
+ const char *msg3)
{
- std::cerr << msg1 << ' ' << msg2 << ' ' << msg3 << std::endl;
+ std::cerr << "gdcm::" << msg1 << ' ' << msg2 << ' ' << msg3
+ << std::endl << std::flush;
Exit(1);
}
* @param msg1 first message part
* @param msg2 second message part
*/
-void Debug::Assert(int level, bool test, const char * msg1,
- const char * msg2)
+void Debug::Assert(int level, bool test, const char *msg1,
+ const char *msg2)
{
if (level > DebugLevel)
{
}
if (!test)
{
- std::cerr << msg1 << ' ' << msg2 << std::endl;
+ std::cerr << "gdcm::" << msg1 << ' ' << msg2
+ << std::endl << std::flush;
}
}
#ifdef __GNUC__
std::exit(a);
#endif
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__BORLANDC__)
exit(a); // Found in #include <stdlib.h>
#endif
}