From 1f61dd15765a31c19c0b0932dadd80322c0e5fed Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 2 Sep 2016 09:19:11 -0700 Subject: [PATCH] Log update validation exception messages before throwing, so user can see them before they bubble up (#2180) --- AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm index 649f39e8c3..db6f41a79f 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm @@ -18,10 +18,12 @@ #import +// 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__);\ }