ApplicationExtensionMethods.LogException Method |
Logs an error and writes it to the request log
Namespace:
NetQuarry
Assembly:
EAP.Core (in EAP.Core.dll) Version: 2.0.0.0 (4.6.8.0)
Syntaxpublic static void LogException(
this IAppContext appCxt,
string source,
string errorName,
Exception ex,
bool writeToRequestLog = true
)
<ExtensionAttribute>
Public Shared Sub LogException (
appCxt As IAppContext,
source As String,
errorName As String,
ex As Exception,
Optional writeToRequestLog As Boolean = true
)
Parameters
- appCxt
- Type: NetQuarry.IAppContext
The application context. - source
- Type: System.String
The source code where the error was detected. - errorName
- Type: System.String
The name of the error. - ex
- Type: System.Exception
The exception. - writeToRequestLog (Optional)
- Type: System.Boolean
Specifies whether or not the error should also be writted to the xot_request_log.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IAppContext. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also