diff --git a/doric-iOS/Pod/Classes/Plugin/DoricImageDecoderPlugin.m b/doric-iOS/Pod/Classes/Plugin/DoricImageDecoderPlugin.m index 77cf55da..dfa1ac03 100644 --- a/doric-iOS/Pod/Classes/Plugin/DoricImageDecoderPlugin.m +++ b/doric-iOS/Pod/Classes/Plugin/DoricImageDecoderPlugin.m @@ -33,6 +33,9 @@ - (void)getImageInfo:(NSDictionary *)resource withPromise:(DoricPromise *)promis @"height": @(image.size.height) }]; }]; + [asyncResult setExceptionCallback:^(NSException * _Nonnull e) { + DoricLog(@"Cannot load resource %s, %s", resource.description, e.description); + }]; } else { DoricLog(@"Cannot find loader for resource %s", resource.description); [promise reject:@"Load error"]; @@ -66,6 +69,9 @@ - (void)decodeToPixels:(NSDictionary *)resource withPromise:(DoricPromise *)prom [promise resolve:data]; }]; + [asyncResult setExceptionCallback:^(NSException * _Nonnull e) { + DoricLog(@"Cannot load resource %s, %s", resource.description, e.description); + }]; } else { DoricLog(@"Cannot find loader for resource %s", resource.description); [promise reject:@"Load error"];