SVG
SVG copied to clipboard
Follow MS guidelines for custom exception types.
Reference Issue
No existing recorded issue.
What does this implement/fix? Explain your changes.
If using this SVG library within a .Net framework AppDomain, exceptions must be serializable to cross AppDomain boundaries.
In addition, implement common exception constructors, in line with guidance at https://docs.microsoft.com/en-us/dotnet/standard/exceptions/best-practices-for-exceptions
WARNING: potentially breaking change. I have also made the exception classes sealed. But this may be a breaking change if any clients have created exceptions derived from these classes. I can revert that if you think it will break compatibility for existing clients.