mirror of
https://github.com/HackPlan/AsyncDisplayKit.git
synced 2026-04-27 17:30:48 +08:00
Log update validation exception messages before throwing, so user can see them before they bubble up (#2180)
This commit is contained in:
@@ -18,10 +18,12 @@
|
|||||||
|
|
||||||
#import <unordered_map>
|
#import <unordered_map>
|
||||||
|
|
||||||
|
// NOTE: We log before throwing so they don't have to let it bubble up to see the error.
|
||||||
#define ASFailUpdateValidation(...)\
|
#define ASFailUpdateValidation(...)\
|
||||||
if ([ASDisplayNode suppressesInvalidCollectionUpdateExceptions]) {\
|
if ([ASDisplayNode suppressesInvalidCollectionUpdateExceptions]) {\
|
||||||
NSLog(__VA_ARGS__);\
|
NSLog(__VA_ARGS__);\
|
||||||
} else {\
|
} else {\
|
||||||
|
NSLog(__VA_ARGS__);\
|
||||||
ASDisplayNodeFailAssert(__VA_ARGS__);\
|
ASDisplayNodeFailAssert(__VA_ARGS__);\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user