Log update validation exception messages before throwing, so user can see them before they bubble up (#2180)

This commit is contained in:
Adlai Holler
2016-09-02 09:19:11 -07:00
committed by GitHub
parent 33a680255c
commit 1f61dd1576

View File

@@ -18,10 +18,12 @@
#import <unordered_map>
// NOTE: We log before throwing so they don't have to let it bubble up to see the error.
#define ASFailUpdateValidation(...)\
if ([ASDisplayNode suppressesInvalidCollectionUpdateExceptions]) {\
NSLog(__VA_ARGS__);\
} else {\
NSLog(__VA_ARGS__);\
ASDisplayNodeFailAssert(__VA_ARGS__);\
}