Partager via


HostedEmailProviderException Class

 

Represents errors that occur in tasks performed by the hosted email provider.

Namespace:   Microsoft.WindowsServerSolutions.HostedEmail
Assembly:  Wssg.HostedEmailObjectModel (in Wssg.HostedEmailObjectModel.dll)

Inheritance Hierarchy

System.Object
  System.Exception
    Microsoft.WindowsServerSolutions.HostedEmail.HostedEmailProviderException

Syntax

[SerializableAttribute]
public class HostedEmailProviderException : Exception
[SerializableAttribute]
public ref class HostedEmailProviderException : Exception
<SerializableAttribute>
Public Class HostedEmailProviderException
    Inherits Exception

Constructors

Name Description
System_CAPS_pubmethod HostedEmailProviderException()

Creates a new instance of the HostedEmailProviderException object.

System_CAPS_protmethod HostedEmailProviderException(SerializationInfo, StreamingContext)

Creates a new instance of the HostedEmailProviderException object, using the specified information and context.

System_CAPS_pubmethod HostedEmailProviderException(String)

Creates a new instance of the HostedEmailProviderException object with a specified error message.

System_CAPS_pubmethod HostedEmailProviderException(String, Exception)

Creates a new instance of the HostedEmailProviderException object, using the specified message and inner exception.

System_CAPS_pubmethod HostedEmailProviderException(String, HostedEmailConfigureFault)

Creates a new instance of the HostedEmailProviderException object, using the specified error message and fault.

System_CAPS_pubmethod HostedEmailProviderException(String, HostedEmailConfigureFault, Exception)

Creates a new instance of the HostedEmailProviderException object using the specified message, fault, and inner exception.

Properties

Name Description
System_CAPS_pubproperty Data

(Inherited from Exception.)

System_CAPS_pubproperty Fault

Retrieves or sets the fault that caused the exception.

System_CAPS_pubproperty HelpLink

(Inherited from Exception.)

System_CAPS_pubproperty HResult

(Inherited from Exception.)

System_CAPS_pubproperty InnerException

(Inherited from Exception.)

System_CAPS_pubproperty Message

(Inherited from Exception.)

System_CAPS_pubproperty Source

(Inherited from Exception.)

System_CAPS_pubproperty StackTrace

(Inherited from Exception.)

System_CAPS_pubproperty TargetSite

(Inherited from Exception.)

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetBaseException()

(Inherited from Exception.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetObjectData(SerializationInfo, StreamingContext)

Sets the serialization information about the exception.(Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).)

System_CAPS_pubmethod GetType()

(Inherited from Exception.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

Creates and returns a string representation of the current exception.(Overrides Exception.ToString().)

Events

Name Description
System_CAPS_protevent SerializeObjectState

(Inherited from Exception.)

Remarks

For more information about implementing hosted email provider exceptions, see How to: Implement Adapter Error Handling.

Examples

The following code describes catching a HostedEmailProviderException as part of the process of loading a hosted email provider. For the complete sample code, see Quickstart: Creating a Hosted Email Adapter.

internal void StartLoadingData()
{
    ShowSplash();
    ThreadPool.QueueUserWorkItem((state) =>
        {
            // Load email account bound with wss user
            try
            {
                LoadEmailAccountInfo(this.propertyBag.UserName);
            }
            catch (InvalidOperationException)
            {
                ShowError();
            }
            catch (OperationInvokeException e)
            {
                HostedEmailProviderException hepe = e.InnerException as HostedEmailProviderException;
                if (hepe != null && hepe.Fault == HostedEmailConfigureFault.WssUserNotAssigned)
                {
                    ShowNoEmailAccountAssigned();
                }
                else
                {
                    ShowError();
                }
                return;
            }

            // Load distribution groups
            LoadDistributionGroups();

            OnDataLoaded();
        });
}

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.

See Also

Microsoft.WindowsServerSolutions.HostedEmail Namespace

Return to top