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

51-avoid-crashing-when-native-call-fails #52

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

JulianBissekkou
Copy link
Collaborator

This PR improves error handling a little bit by catching native exceptions and providing an error message without terminating the process.
I also fixed the polyline implementation on mobile which failed to parse the coordinates in the payload.

@JulianBissekkou JulianBissekkou linked an issue Nov 26, 2023 that may be closed by this pull request
Comment on lines +1 to +13
//
// ParseException.swift
// arcgis_map_sdk_ios
//
// Created by Julian Bissekkou on 26.11.23.
//

import Foundation


struct ParseException: Error {
let message: String
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When checking the branch locally on your maschine, do you see this file in xcode?
Works on my maschine, but I would expect a change in the xcode project file that references to this new file...

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I made some suggested updates in the pods. I don't know if it influenced anything.

Copy link
Collaborator

@MatthaiosSait MatthaiosSait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍


return points.map { subPoints ->
Graphic().apply {
geometry = Polyline(PointCollection(subPoints.map { it.toAGSPoint() }))
geometry = Polyline(PointCollection(subPoints.map { coordinateArray ->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Polyline fix works 👍

@JulianBissekkou JulianBissekkou merged commit d3395cb into main Dec 4, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid crashing when native call fails
2 participants