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)

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

[SerializableAttribute]
public ref class HostedEmailProviderException : Exception

NameDescription
System_CAPS_pubmethodHostedEmailProviderException()

Creates a new instance of the HostedEmailProviderException object.

System_CAPS_protmethodHostedEmailProviderException(SerializationInfo^, StreamingContext)

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

System_CAPS_pubmethodHostedEmailProviderException(String^)

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

System_CAPS_pubmethodHostedEmailProviderException(String^, Exception^)

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

System_CAPS_pubmethodHostedEmailProviderException(String^, HostedEmailConfigureFault)

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

System_CAPS_pubmethodHostedEmailProviderException(String^, HostedEmailConfigureFault, Exception^)

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

NameDescription
System_CAPS_pubpropertyData

(Inherited from Exception.)

System_CAPS_pubpropertyFault

Retrieves or sets the fault that caused the exception.

System_CAPS_pubpropertyHelpLink

(Inherited from Exception.)

System_CAPS_pubpropertyHResult

(Inherited from Exception.)

System_CAPS_pubpropertyInnerException

(Inherited from Exception.)

System_CAPS_pubpropertyMessage

(Inherited from Exception.)

System_CAPS_pubpropertySource

(Inherited from Exception.)

System_CAPS_pubpropertyStackTrace

(Inherited from Exception.)

System_CAPS_pubpropertyTargetSite

(Inherited from Exception.)

NameDescription
System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetBaseException()

(Inherited from Exception.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetObjectData(SerializationInfo^, StreamingContext)

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

System_CAPS_pubmethodGetType()

(Inherited from Exception.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

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

NameDescription
System_CAPS_proteventSerializeObjectState

(Inherited from Exception.)

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

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();
        });
}

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top

Community Additions

ADD
Show: