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

Possibility for better exceptions #13

Open
stewartgordonsitka opened this issue Feb 12, 2020 · 2 comments
Open

Possibility for better exceptions #13

stewartgordonsitka opened this issue Feb 12, 2020 · 2 comments

Comments

@stewartgordonsitka
Copy link

Hi egonl,

Thanks for the library and the recent to the nuget package for v2, I really appreciate the work that you've put into this.

Currently we are catching the SharpDocxCompilationException and returning some helpful messages to users, but we noticed there are some exceptions thrown in the CodeBlockBuilder that are a generic System.Exception.

While parsing the message doesn't cause too much trouble, it could be helpful to have the SharpDocxCompilationException thrown here or perhaps a new type of SharpDocxCodeBlockBuilderException.

Would you find it helpful if I submitted a pull request for something like this in the future?

Thank you

@egonl
Copy link
Owner

egonl commented Mar 13, 2020

Good point. I think CodeBlockBuilder and DocumentCompiler should throw a SharpDocxParseException when there's an error parsing the document. What do you think?

Oh and yes, pull requests would be much appreciated.

@MAP-Akamae
Copy link

MAP-Akamae commented Jan 9, 2021

Hi,

  It would be great if the errors were returned within the message property which is a default property 
  of every exception instead of the custom property Errors

I know that the entity framework team does something similar to you, but I think this makes it more difficult than
it helps to debug problems

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

No branches or pull requests

3 participants