Errors and Exceptions covers how you should deal with errors, throw and catch exceptions, and filter exceptions when catching them.
This chapter contains the following code samples:
- SimpleExceptions (
try
,catch
, andthrow
) - ExceptionFilters (filtering with
when
) - RethrowExceptions (rethrowing exceptions)
- SolicitColdCall (user-defined exceptions)
- CallerInformation (using
CallerLineNumber
,CallerFilePath
,CallerMemberName
)
For code comments and issues please check Professional C#'s GitHub Repository
Please check my blog csharp.christiannagel.com for additional information for topics covered in the book.
Thank you!