Class ExceptionExtensions
- Namespace
- Loehnert.Lisrt.Messaging.Exceptions
- Assembly
- Loehnert.Lisrt.dll
Extensions for Exception.
public static class ExceptionExtensions
- Inheritance
-
ExceptionExtensions
- Inherited Members
Methods
AddModuleInformation(Exception, ILisrtModule)
Adds information about the module to the exception.
public static void AddModuleInformation(this Exception ex, ILisrtModule module)
Parameters
ex
ExceptionThe exception which gets more information.
module
ILisrtModuleModule with the information.
GetModule(Exception)
Tries to get a ILisrtModule implementation from exception data.
public static ILisrtModule GetModule(this Exception ex)
Parameters
ex
ExceptionException with module information.
Returns
- ILisrtModule
Null or module.
Remarks
The module full name is saved in Data with key ModuleFullnameKey.
Exceptions
- ArgumentNullException
Thrown when an argument is null.
ThrowWithModuleInformation(Exception, ILisrtModule)
Adds information about the module to the exception and throws it.
public static void ThrowWithModuleInformation(this Exception ex, ILisrtModule module)
Parameters
ex
ExceptionThe exception which gets more information.
module
ILisrtModuleModule with the information.