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

Improve error handling #151

Open
tobiasdiez opened this issue Aug 13, 2021 · 0 comments · May be fixed by #186
Open

Improve error handling #151

tobiasdiez opened this issue Aug 13, 2021 · 0 comments · May be fixed by #186
Labels
p3: minor For example an edge case that only affects very specific usage type: developer experience type: enhancement Improving upon an existing feature

Comments

@tobiasdiez
Copy link
Member

Right now errors are caught in the word-api and void is returned; but the void case is almost always not handled by the caller. Catching the exception makes sense only if there is a sensible value we can return in case there is an error. According to https://docs.microsoft.com/en-us/office/dev/add-ins/excel/excel-add-ins-error-handling most errors returned seem quite exceptional and there is no sensible way to recover (e.g InactiveWorkbook, ApiNotAvailable, ...). In these cases it would be better to let the error bubble upwards and add one central handler that converts the error code to a sensible user-facing error message. Adding some form of exception handler in the word-api makes sense if a certain error is kind of expected (maybe InvalidSelection) and one can recover from this.

@tobiasdiez tobiasdiez added the type: enhancement Improving upon an existing feature label Aug 13, 2021
@tobiasdiez tobiasdiez added p3: minor For example an edge case that only affects very specific usage type: developer experience labels Apr 21, 2023
@tobiasdiez tobiasdiez linked a pull request Apr 21, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3: minor For example an edge case that only affects very specific usage type: developer experience type: enhancement Improving upon an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant