From 26279af622e06c2777ac2f55cd0ae74dd2f70b76 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 8 Jan 2019 10:14:12 +0000 Subject: [PATCH] Made it possible to provide a user-supplied definition for JUCE_LOG_CURRENT_ASSERTION to enable custom behaviour when an assertion fails --- modules/juce_core/system/juce_PlatformDefs.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/juce_core/system/juce_PlatformDefs.h b/modules/juce_core/system/juce_PlatformDefs.h index 995c2e8113..1701582c94 100644 --- a/modules/juce_core/system/juce_PlatformDefs.h +++ b/modules/juce_core/system/juce_PlatformDefs.h @@ -48,10 +48,12 @@ namespace juce //============================================================================== // Debugging and assertion macros -#if JUCE_LOG_ASSERTIONS || JUCE_DEBUG - #define JUCE_LOG_CURRENT_ASSERTION juce::logAssertion (__FILE__, __LINE__); -#else - #define JUCE_LOG_CURRENT_ASSERTION +#ifndef JUCE_LOG_CURRENT_ASSERTION + #if JUCE_LOG_ASSERTIONS || JUCE_DEBUG + #define JUCE_LOG_CURRENT_ASSERTION juce::logAssertion (__FILE__, __LINE__); + #else + #define JUCE_LOG_CURRENT_ASSERTION + #endif #endif //==============================================================================