sal: let DISABLE_SAL_DBGBOX only disable GUI message boxes
If DISABLE_SAL_DBGBOX is set, fall back to printing on stderr. Change-Id: Id525b4012291b6b29cca7abcaad7483bc6bfba3b
This commit is contained in:
@@ -230,10 +230,6 @@ sal_Bool SAL_CALL osl_assertFailedLine (
|
|||||||
return sal_False;
|
return sal_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if SAL assertions are disabled in general, stop here */
|
|
||||||
if ( getenv("DISABLE_SAL_DBGBOX") )
|
|
||||||
return doAbort;
|
|
||||||
|
|
||||||
/* format message into buffer */
|
/* format message into buffer */
|
||||||
if (pszMessage != 0)
|
if (pszMessage != 0)
|
||||||
{
|
{
|
||||||
|
@@ -28,6 +28,8 @@
|
|||||||
|
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include <osl/diagnose.h>
|
#include <osl/diagnose.h>
|
||||||
|
|
||||||
static pfunc_osl_printDebugMessage _pPrintDebugMessage = NULL;
|
static pfunc_osl_printDebugMessage _pPrintDebugMessage = NULL;
|
||||||
@@ -119,6 +121,10 @@ sal_Bool SAL_CALL osl_assertFailedLine(const sal_Char* pszFileName, sal_Int32 nL
|
|||||||
if (nCode == IDCANCEL)
|
if (nCode == IDCANCEL)
|
||||||
return sal_True; /* will cause oslDebugBreak */
|
return sal_True; /* will cause oslDebugBreak */
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fputs(szMessage, stderr); // fall back
|
||||||
|
}
|
||||||
return ( ( env != NULL ) && ( *env != '\0' ) );
|
return ( ( env != NULL ) && ( *env != '\0' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user