diff options
author | m-stephen <truestyle2005@163.com> | 2019-09-20 10:14:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-20 10:14:44 +0800 |
commit | 8128d709b62189e0745ea64be3d35e8c6dab59fa (patch) | |
tree | 0cc8d278b0a1f7ca626f5a0e67a4287d4da18ab5 /platform/darwin/src/MGLShape.mm | |
parent | da6a7e9318e911ab03cacde781235b50326770ec (diff) | |
download | qtlocation-mapboxgl-8128d709b62189e0745ea64be3d35e8c6dab59fa.tar.gz |
[ios]Add errors reporting (#15391)
* add errors reporting
* [ios] report error if rendering takes > 1 second. (#15633)
Diffstat (limited to 'platform/darwin/src/MGLShape.mm')
-rw-r--r-- | platform/darwin/src/MGLShape.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLShape.mm b/platform/darwin/src/MGLShape.mm index 59643dcb6a..4ed546a3d2 100644 --- a/platform/darwin/src/MGLShape.mm +++ b/platform/darwin/src/MGLShape.mm @@ -5,6 +5,10 @@ #import "NSString+MGLAdditions.h" #import "MGLTypes.h" +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR +#import "MMEEventsManager.h" +#endif + #import <mbgl/util/geo.hpp> bool operator==(const CLLocationCoordinate2D lhs, const CLLocationCoordinate2D rhs) { @@ -18,6 +22,9 @@ bool operator==(const CLLocationCoordinate2D lhs, const CLLocationCoordinate2D r if (!string) { if (outError) { *outError = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeUnknown userInfo:nil]; +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR + [[MMEEventsManager sharedManager] reportError:*outError]; +#endif } return nil; } @@ -30,6 +37,9 @@ bool operator==(const CLLocationCoordinate2D lhs, const CLLocationCoordinate2D r *outError = [NSError errorWithDomain:MGLErrorDomain code:MGLErrorCodeUnknown userInfo:@{ NSLocalizedFailureReasonErrorKey: @(err.what()), }]; +#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR + [[MMEEventsManager sharedManager] reportError:*outError]; +#endif } return nil; } |