Browse Source

Changed the OSX folder used for interprocess lock files. Fixed the JUCE_CATCH_UNHANDLED_EXCEPTIONS flag.

tags/2021-05-28
jules 14 years ago
parent
commit
f29aa4c468
5 changed files with 22 additions and 6 deletions
  1. +7
    -0
      modules/juce_core/juce_core.h
  2. +9
    -4
      modules/juce_core/native/juce_posix_SharedCode.h
  3. +1
    -1
      modules/juce_core/system/juce_PlatformDefs.h
  4. +4
    -0
      modules/juce_events/juce_events.cpp
  5. +1
    -1
      modules/juce_events/native/juce_mac_MessageManager.mm

+ 7
- 0
modules/juce_core/juce_core.h View File

@@ -90,6 +90,13 @@
#define JUCE_ZLIB_INCLUDE_PATH <zlib.h>
#endif
/* Config: JUCE_CATCH_UNHANDLED_EXCEPTIONS
If enabled, this will add some exception-catching code to forward unhandled exceptions
to your JUCEApplication::unhandledException() callback.
*/
#ifndef JUCE_CATCH_UNHANDLED_EXCEPTIONS
//#define JUCE_CATCH_UNHANDLED_EXCEPTIONS 1
#endif
//=============================================================================
//=============================================================================


+ 9
- 4
modules/juce_core/native/juce_posix_SharedCode.h View File

@@ -682,11 +682,16 @@ public:
#if JUCE_IOS
handle = 1; // On iOS we can't run multiple apps, so just assume success.
#else
// Note that we can't get the normal temp folder here, as it might be different for each app.
File tempFolder ("/var/tmp");
if (! tempFolder.isDirectory())
tempFolder = "/tmp";
// Note that we can't get the normal temp folder here, as it might be different for each app.
#if JUCE_MAC
File tempFolder ("~/Library/Caches/com.juce.locks");
#else
File tempFolder ("/var/tmp");
if (! tempFolder.isDirectory())
tempFolder = "/tmp";
#endif
const File temp (tempFolder.getChildFile (name));


+ 1
- 1
modules/juce_core/system/juce_PlatformDefs.h View File

@@ -205,7 +205,7 @@
#define JUCE_CATCH_ALL catch (...) {}
#define JUCE_CATCH_ALL_ASSERT catch (...) { jassertfalse; }
#if JUCE_ONLY_BUILD_CORE_LIBRARY
#if ! JUCE_MODULE_AVAILABLE_juce_gui_basics
#define JUCE_CATCH_EXCEPTION JUCE_CATCH_ALL
#else
/** Used in try-catch blocks, this macro will send exceptions to the JUCEApplication


+ 4
- 0
modules/juce_events/juce_events.cpp View File

@@ -39,6 +39,10 @@
#include "../juce_core/native/juce_BasicNativeHeaders.h"
#include "juce_events.h"
#if JUCE_CATCH_UNHANDLED_EXCEPTIONS && JUCE_MODULE_AVAILABLE_juce_gui_basics
#include "../juce_gui_basics/juce_gui_basics.h"
#endif
//==============================================================================
#if JUCE_MAC
#import <IOKit/IOKitLib.h>


+ 1
- 1
modules/juce_events/native/juce_mac_MessageManager.mm View File

@@ -310,7 +310,7 @@ void MessageManager::runDispatchLoop()
{
// An AppKit exception will kill the app, but at least this provides a chance to log it.,
std::runtime_error ex (std::string ("NSException: ") + [[e name] UTF8String] + ", Reason:" + [[e reason] UTF8String]);
JUCEApplicationBase::sendUnhandledException (&ex, __FILE__, __LINE__);
JUCEApplication::sendUnhandledException (&ex, __FILE__, __LINE__);
}
@finally
{


Loading…
Cancel
Save