Currently all exceptions are thrown to the calling program. Catch expected exceptions e.g. anything that calls remote data sources should attempt to catch any exceptions and resolve them at first chance. If required to re-throw: Wrap them in a new type of exception, with the thrown exception as an inner exception on the new type of exception.
Types of Exceptions to create:
JsonizeHttpException: Thrown when an http request fails.
JsonizeException: Generic.
JsonizeHtmlParseException: Thrown to catch errors parsing the html. Should mostly catch errors in HTMLAgilityPack.
JsonizeJsonParseException: Thrown to catch errors in parsing the generated objects to json object/string. Should mostly catch errors from the Newtonsoft.Json package.
Suggestions about implementation and exception types is welcome.
Currently all exceptions are thrown to the calling program. Catch expected exceptions e.g. anything that calls remote data sources should attempt to catch any exceptions and resolve them at first chance. If required to re-throw: Wrap them in a new type of exception, with the thrown exception as an inner exception on the new type of exception.
Types of Exceptions to create:
Suggestions about implementation and exception types is welcome.