From d975907a1e15f0b6e392e88c3cff1b8ca72eab7d Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Sat, 19 Jun 2010 09:10:33 +0100 Subject: [PATCH] Small fix for command-line apps --- juce_amalgamated.h | 32 ++++++++++++++++++-------------- src/core/juce_PlatformDefs.h | 30 +++++++++++++++++------------- src/core/juce_StandardHeader.h | 2 +- 3 files changed, 36 insertions(+), 28 deletions(-) diff --git a/juce_amalgamated.h b/juce_amalgamated.h index 636c161e5b..6fa97f54ce 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -64,7 +64,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 52 -#define JUCE_BUILDNUMBER 26 +#define JUCE_BUILDNUMBER 27 /** Current Juce version number. @@ -620,22 +620,26 @@ #define JUCE_TRY try - /** Used in try-catch blocks, this macro will send exceptions to the JUCEApplication - object so they can be logged by the application if it wants to. - */ - #define JUCE_CATCH_EXCEPTION \ - catch (const std::exception& e) \ - { \ - JUCEApplication::sendUnhandledException (&e, __FILE__, __LINE__); \ - } \ - catch (...) \ - { \ - JUCEApplication::sendUnhandledException (0, __FILE__, __LINE__); \ - } - #define JUCE_CATCH_ALL catch (...) {} #define JUCE_CATCH_ALL_ASSERT catch (...) { jassertfalse; } + #if JUCE_ONLY_BUILD_CORE_LIBRARY + #define JUCE_CATCH_EXCEPTION JUCE_CATCH_ALL + #else + /** Used in try-catch blocks, this macro will send exceptions to the JUCEApplication + object so they can be logged by the application if it wants to. + */ + #define JUCE_CATCH_EXCEPTION \ + catch (const std::exception& e) \ + { \ + JUCEApplication::sendUnhandledException (&e, __FILE__, __LINE__); \ + } \ + catch (...) \ + { \ + JUCEApplication::sendUnhandledException (0, __FILE__, __LINE__); \ + } + #endif + #else #define JUCE_TRY diff --git a/src/core/juce_PlatformDefs.h b/src/core/juce_PlatformDefs.h index ada26b243c..8fd28b8918 100644 --- a/src/core/juce_PlatformDefs.h +++ b/src/core/juce_PlatformDefs.h @@ -159,22 +159,26 @@ #define JUCE_TRY try - /** Used in try-catch blocks, this macro will send exceptions to the JUCEApplication - object so they can be logged by the application if it wants to. - */ - #define JUCE_CATCH_EXCEPTION \ - catch (const std::exception& e) \ - { \ - JUCEApplication::sendUnhandledException (&e, __FILE__, __LINE__); \ - } \ - catch (...) \ - { \ - JUCEApplication::sendUnhandledException (0, __FILE__, __LINE__); \ - } - #define JUCE_CATCH_ALL catch (...) {} #define JUCE_CATCH_ALL_ASSERT catch (...) { jassertfalse; } + #if JUCE_ONLY_BUILD_CORE_LIBRARY + #define JUCE_CATCH_EXCEPTION JUCE_CATCH_ALL + #else + /** Used in try-catch blocks, this macro will send exceptions to the JUCEApplication + object so they can be logged by the application if it wants to. + */ + #define JUCE_CATCH_EXCEPTION \ + catch (const std::exception& e) \ + { \ + JUCEApplication::sendUnhandledException (&e, __FILE__, __LINE__); \ + } \ + catch (...) \ + { \ + JUCEApplication::sendUnhandledException (0, __FILE__, __LINE__); \ + } + #endif + #else #define JUCE_TRY diff --git a/src/core/juce_StandardHeader.h b/src/core/juce_StandardHeader.h index 9c5f2734c9..cdc20f9327 100644 --- a/src/core/juce_StandardHeader.h +++ b/src/core/juce_StandardHeader.h @@ -33,7 +33,7 @@ */ #define JUCE_MAJOR_VERSION 1 #define JUCE_MINOR_VERSION 52 -#define JUCE_BUILDNUMBER 26 +#define JUCE_BUILDNUMBER 27 /** Current Juce version number.