mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Changed the OSX folder used for interprocess lock files. Fixed the JUCE_CATCH_UNHANDLED_EXCEPTIONS flag.
This commit is contained in:
parent
29def60175
commit
f29aa4c468
5 changed files with 22 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
//=============================================================================
|
||||
//=============================================================================
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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…
Add table
Add a link
Reference in a new issue