mirror of https://github.com/CGAL/cgal
Avoid duplicating error messages with g++.
This commit is contained in:
parent
93caf16415
commit
dddf37f5cc
|
|
@ -58,13 +58,17 @@ _standard_error_handler(
|
||||||
int line,
|
int line,
|
||||||
const char* msg )
|
const char* msg )
|
||||||
{
|
{
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// After g++ 3.4, std::terminate defaults to printing to std::cerr itself.
|
||||||
|
if (_error_behaviour == THROW_EXCEPTION)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
std::cerr << "CGAL error: " << what << " violation!" << std::endl
|
std::cerr << "CGAL error: " << what << " violation!" << std::endl
|
||||||
<< "Expr: " << expr << std::endl
|
<< "Expression : " << expr << std::endl
|
||||||
<< "File : " << file << std::endl
|
<< "File : " << file << std::endl
|
||||||
<< "Line: " << line << std::endl;
|
<< "Line : " << line << std::endl
|
||||||
if ( msg != 0)
|
<< "Explanation: " << msg << std::endl
|
||||||
std::cerr << "Explanation:" << msg << std::endl;
|
<< "Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html"
|
||||||
std::cerr << "Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html"
|
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -78,12 +82,18 @@ _standard_warning_handler( const char *,
|
||||||
int line,
|
int line,
|
||||||
const char* msg )
|
const char* msg )
|
||||||
{
|
{
|
||||||
|
#ifdef __GNUG__
|
||||||
|
// After g++ 3.4, std::terminate defaults to printing to std::cerr itself.
|
||||||
|
if (_warning_behaviour == THROW_EXCEPTION)
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
std::cerr << "CGAL warning: check violation!" << std::endl
|
std::cerr << "CGAL warning: check violation!" << std::endl
|
||||||
<< "Expr: " << expr << std::endl
|
<< "Expression : " << expr << std::endl
|
||||||
<< "File : " << file << std::endl
|
<< "File : " << file << std::endl
|
||||||
<< "Line: " << line << std::endl;
|
<< "Line : " << line << std::endl
|
||||||
if ( msg != 0)
|
<< "Explanation: " << msg << std::endl
|
||||||
std::cerr << "Explanation:" << msg << std::endl;
|
<< "Refer to the bug-reporting instructions at http://www.cgal.org/bug_report.html"
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// default handler settings
|
// default handler settings
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue