Error Class
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Represents an utility class for creating, logging and unwrapping Exception instances.
Inheritance Hierarchy
System.Object
System.Web.Http.Common.Error
Namespace: System.Web.Http.Common
Assembly: System.Web.Http.Common (in System.Web.Http.Common.dll)
Syntax
'Declaration
Public NotInheritable Class Error
public static class Error
public ref class Error abstract sealed
[<AbstractClass>]
[<Sealed>]
type Error = class end
public final class Error
The Error type exposes the following members.
Methods
Name | Description | |
---|---|---|
Argument(String, Object[]) | Creates an ArgumentException with the provided properties and logs it with Error. | |
Argument(String, String, Object[]) | Creates an ArgumentException with the provided properties and logs it with Error. | |
ArgumentNull(String) | Creates an ArgumentNullException with the provided properties and logs it with Error. | |
ArgumentNull(String, String, Object[]) | Creates an ArgumentNullException with the provided properties and logs it with Error. | |
ArgumentNullOrEmpty | Creates an ArgumentException with a default message and logs it with Error. | |
ArgumentOutOfRange | Creates an ArgumentOutOfRangeException with the provided properties and logs it with Error. | |
ArgumentTooLarge | Creates an ArgumentOutOfRangeException with a message saying that the argument must be less than or equal to maxValue and logs it with Error. | |
ArgumentTooSmall | Creates an ArgumentOutOfRangeException with a message saying that the argument must be greater than or equal to minValue and logs it with Error. | |
ArgumentUriHasQueryOrFragment | Creates an ArgumentException with a message saying that the argument must be an absolute URI without a query or fragment identifier and then logs it with Error. | |
ArgumentUriNotAbsolute | Creates an ArgumentException with a message saying that the argument must be an absolute URI and logs it with Error. | |
ArgumentUriNotHttpOrHttpsScheme | Creates an ArgumentException with a message saying that the argument must be an "http" or "https" URI and logs it with Error. | |
AsError(Exception) | Unwraps and logs an Exception as Error. | |
AsError<TPreferredException>(AggregateException) | Unwraps and logs an AggregateException as Error using TPreferredException as the preferred unwrapped Exception to return. | |
AsInformation(Exception) | Unwraps and logs an Exception as Info. | |
AsInformation<TPreferredException>(AggregateException) | Unwraps and logs an AggregateException as Info using TPreferredException as the preferred unwrapped Exception to return. | |
AsVerbose(Exception) | Unwraps and logs an Exception as Verbose. | |
AsVerbose<TPreferredException>(AggregateException) | Unwraps and logs an AggregateException as Verbose using TPreferredException as the preferred unwrapped Exception to return. | |
AsWarning(Exception) | Unwraps and logs an Exception as Warning. | |
AsWarning<TPreferredException>(AggregateException) | Unwraps and logs an AggregateException as Warning using TPreferredException as the preferred unwrapped Exception to return. | |
Format | Formats the specified resource string using CurrentCulture(). | |
InvalidEnumArgument | Creates an InvalidEnumArgumentException and logs it with Error. | |
InvalidOperation(String, Object[]) | Creates an InvalidOperationException and logs it with Error. | |
InvalidOperation(Exception, String, Object[]) | Creates an InvalidOperationException and logs it with Error. | |
KeyNotFound() | Creates an KeyNotFoundException with a message saying that the key was not found and logs it with Error. | |
KeyNotFound(String, Object[]) | Creates an KeyNotFoundException with a message saying that the key was not found and logs it with Error. | |
NotSupported | Creates an NotSupportedException and logs it with Error. | |
ObjectDisposed | Creates an ObjectDisposedException initialized according to guidelines and logs it with Error. | |
OperationCanceled() | Creates an OperationCanceledException initialized with the provided parameters and logs it with Error. | |
OperationCanceled(String, Object[]) | Creates an OperationCanceledException initialized with the provided parameters and logs it with Error. | |
PropertyNull | Creates an ArgumentNullException with the provided properties and logs it with Error. |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.