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

Feat/on error #2

Closed
wants to merge 10 commits into from
Closed

Feat/on error #2

wants to merge 10 commits into from

Conversation

zbeyens
Copy link
Member

@zbeyens zbeyens commented Apr 27, 2023

No description provided.

@reviewpad
Copy link

reviewpad bot commented Apr 27, 2023

AI-Generated Summary: This pull request includes updates across various files in the codebase, focusing mainly on improving error handling, adding null/undefined checks, and refining return types for functions. Major changes include the introduction of an ErrorLogger to handle errors asynchronously, updating the return types of many functions to include | undefined, replacing throw new Error() statements with asynchronous error logging calls using ErrorLogger.onError, and adding conditional checks for variables before accessing them. Additional minor changes consist of import order modifications, alphabetizing dependencies, refactoring, and code simplification. Overall, these changes aim to improve code stability, maintainability, readability, and robustness by handling edge cases and providing clearer error messages for users.

@reviewpad
Copy link

reviewpad bot commented Apr 27, 2023

Thank you @zbeyens for this first contribution!

@reviewpad reviewpad bot added large Pull request is large waiting-for-review labels Apr 27, 2023
@reviewpad
Copy link

reviewpad bot commented Apr 27, 2023

Reviewpad Report

⚠️ Warnings

  • Please rebase your pull request on the latest changes

@reviewpad
Copy link

reviewpad bot commented Apr 27, 2023

AI-Generated Summary: This pull request introduces numerous changes to the codebase, mainly focusing on improved error handling, handling of edge cases, and code robustness. These changes span across multiple files and include the addition of checks for null or undefined values, updates to method return types, and the implementation of a new ErrorLogger module. Additionally, error handling and reporting have been updated to use the editor.onError() method or the ErrorLogger module, providing a more consistent approach to error management. The documentation has also been updated to reflect the changes in method return types, indicating that some methods may return undefined values. Overall, the main goal of this pull request is to enhance the reliability, user experience, and stability of the Slate Editor and its associated packages.

@reviewpad
Copy link

reviewpad bot commented Apr 27, 2023

AI-Generated Summary: This pull request introduces various modifications across several files primarily aimed at improving robustness, readability, and error handling. The changes include adding extra condition checks for potential null or undefined variables, updating return types of some methods to include "| undefined", replacing instances of throwing errors with using the editor.onError method for better error reporting, and adding the global ErrorLogger interface. Additionally, some code refactoring and reordering of imports have been made for better readability and maintainability.

@zbeyens zbeyens closed this Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
large Pull request is large waiting-for-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant