-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored places to use the new error handling system
Replaced the error_support method with the new system that consists of: - `PlacesInternalError`: used internally in the crate. This replaces the old `ErrorKind` enum and is the error for `Result<>`. - `PlacesError`: used for external errors that we return to UniFFI consumers. This replaces the old `Error` enum and is the error for `ApiResult<>` - A `GetErrorHandling` impl to convert internal errors to external errors and report to sentry. For now, I tried to make the sentry error reporting more-or-less match the old error reporting, which means reporting lots of internal errors. The plan is going to be to check sentry and most likely turn some of those into logs rather than errors. Reworked all top-level API methods to return `PlacesApiResults` and use the `handle_error!` macro to do the error conversion/reporting. Use `thiserror` to handle converting errors from other crates into `PlacesInternalError`.
- Loading branch information
Showing
20 changed files
with
579 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.