Errors caused by client code should be communicated through NSExceptions. NSAsserts are intended for internal usage; because they include helpful information like the absolute path to the file containing the assertion, stripping the build (#1650) also strips assertion messages. Also replaced hardcoded references to methods in these messages with __PRETTY_FUNCTION__, which avoids future copy-pasta and handles cases in which the MGL class has been subclassed.
4 lines
215 B
Objective-C
4 lines
215 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
#define MGLAssertIsMainThread() NSAssert([[NSThread currentThread] isMainThread], @"%s must be accessed on the main thread, not %@", __PRETTY_FUNCTION__, [NSThread currentThread])
|