Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLNStyle addSource throws NSException instead of returning NSError #2939

Open
albertmoravec opened this issue Oct 15, 2024 · 1 comment
Open
Labels
enhancement New feature or request iOS

Comments

@albertmoravec
Copy link

Describe the bug
Adding source via MLNStyle.addSource() twice causes MLNRedundantSourceIdentifierException to be thrown. Since this is an Objective-C exception, AFAIK it is impossible to catch it from Swift without additional tooling in ObjC, ultimately causing my Flutter app to crash.

To Reproduce
Steps to reproduce the behavior:

  1. Call MLNStyle.addSource() twice for the same source from Swift
  2. NSException is thrown which cannot be handled directly in Swift

Expected behavior
NSError should be returned so it can be properly handled.

Platform information (please complete the following information):

  • OS: iOS
  • Platform iOS
  • Version 16.7.4
@albertmoravec albertmoravec added the bug Something isn't working label Oct 15, 2024
@louwers louwers added enhancement New feature or request iOS and removed bug Something isn't working labels Oct 15, 2024
@louwers
Copy link
Collaborator

louwers commented Oct 16, 2024

Related issue: #1248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request iOS
Projects
None yet
Development

No branches or pull requests

2 participants