ServerManagerException Constructors

Definition

Initializes a new instance of the ServerManagerException class.

Overloads

ServerManagerException()

Initializes a new instance of the ServerManagerException class.

ServerManagerException(String)

Initializes a new instance of the ServerManagerException class that uses the specified error message.

ServerManagerException(String, Exception)

Initializes a new instance of the ServerManagerException class that uses the specified error message and a reference to the inner exception that is the cause of this exception.

ServerManagerException(String, Int32)

Initializes a new instance of the ServerManagerException class that uses the specified error message and error code.

ServerManagerException(String, Exception, Int32)

Initializes a new instance of the ServerManagerException class that uses the specified error message, a reference to the inner exception that is the cause of this exception, and the specified error code.

ServerManagerException()

Initializes a new instance of the ServerManagerException class.

public:
 ServerManagerException();
public ServerManagerException ();
Public Sub New ()

Remarks

This constructor initializes the System.Exception.Message property of the new instance to System.String.Empty.

Applies to

ServerManagerException(String)

Initializes a new instance of the ServerManagerException class that uses the specified error message.

public:
 ServerManagerException(System::String ^ errorMessage);
public ServerManagerException (string errorMessage);
new Microsoft.Web.Administration.ServerManagerException : string -> Microsoft.Web.Administration.ServerManagerException
Public Sub New (errorMessage As String)

Parameters

errorMessage
String

The error message.

Remarks

The content of the errorMessage parameter should be human readable. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

Applies to

ServerManagerException(String, Exception)

Initializes a new instance of the ServerManagerException class that uses the specified error message and a reference to the inner exception that is the cause of this exception.

public:
 ServerManagerException(System::String ^ errorMessage, Exception ^ exception);
public ServerManagerException (string errorMessage, Exception exception);
new Microsoft.Web.Administration.ServerManagerException : string * Exception -> Microsoft.Web.Administration.ServerManagerException

Parameters

errorMessage
String

The error message string.

exception
Exception

The exception that is the cause of the current exception. If the exception parameter is not null, the current exception is raised in a catch block that handles the inner exception.

Remarks

An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the System.Exception.InnerException property. InnerException gets the same value that is passed into the constructor, or it returns null if InnerException does not supply the inner exception value to the constructor.

Applies to

ServerManagerException(String, Int32)

Initializes a new instance of the ServerManagerException class that uses the specified error message and error code.

public:
 ServerManagerException(System::String ^ errorMessage, int errorCode);
public ServerManagerException (string errorMessage, int errorCode);
new Microsoft.Web.Administration.ServerManagerException : string * int -> Microsoft.Web.Administration.ServerManagerException
Public Sub New (errorMessage As String, errorCode As Integer)

Parameters

errorMessage
String

The error message string.

errorCode
Int32

The error code that indicates the cause of this exception.

Remarks

Callers can access the provided errorCode parameter by using the ErrorCode property.

Applies to

ServerManagerException(String, Exception, Int32)

Initializes a new instance of the ServerManagerException class that uses the specified error message, a reference to the inner exception that is the cause of this exception, and the specified error code.

public:
 ServerManagerException(System::String ^ errorMessage, Exception ^ exception, int errorCode);
public ServerManagerException (string errorMessage, Exception exception, int errorCode);
new Microsoft.Web.Administration.ServerManagerException : string * Exception * int -> Microsoft.Web.Administration.ServerManagerException

Parameters

errorMessage
String

The error message string.

exception
Exception

The exception that is the cause of the current exception. If the exception parameter is not null, the current exception is raised in a catch block that handles the inner exception.

errorCode
Int32

The error code that indicates the cause of this exception.

Remarks

Callers can access the provided errorCode parameter by using the ErrorCode property.

Applies to