improve printf/warning/error on Mac OSX

This commit is contained in:
Erwin Coumans
2014-01-31 15:05:13 -08:00
parent 0cfd84c920
commit 65cfcdb9ac
2 changed files with 25 additions and 10 deletions

View File

@@ -79,21 +79,20 @@ void MyFatalBreakAPPLE( const char * errstr ,
size_t cb ,
void * user_data )
{
b3Error("Error: %s\n", errstr);
const char* patloc = strstr(errstr, "Warning");
//find out if it is a warning or error, exit if error
if (patloc)
{
b3Warning("warning\n");
b3Warning("Warning: %s\n", errstr);
} else
{
b3Error("error\n");
b3Error("Error: %s\n", errstr);
b3Assert(0);
}
}
#ifdef B3_USE_CLEW