Error.AsError Method (Exception)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Unwraps and logs an Exception as Error.
Namespace: System.Web.Http.Common
Assembly: System.Web.Http.Common (in System.Web.Http.Common.dll)
Syntax
'Declaration
Public Shared Function AsError ( _
exception As Exception _
) As Exception
public static Exception AsError(
Exception exception
)
public:
static Exception^ AsError(
Exception^ exception
)
static member AsError :
exception:Exception -> Exception
public static function AsError(
exception : Exception
) : Exception
Parameters
- exception
Type: System.Exception
The exception to unwrap and log
Return Value
Type: System.Exception
The unwrapped and logged exception.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.