ExceptionReceivedEventArgs Class

  • java.lang.Object
    • com.microsoft.azure.eventprocessorhost.ExceptionReceivedEventArgs

public class ExceptionReceivedEventArgs

Passed as an argument to the general exception handler that can be set via EventProcessorOptions.

Field Summary

Modifier and Type Field and Description
final String NO_ASSOCIATED_PARTITION

Method Summary

Modifier and Type Method and Description
String getAction()

See EventProcessorHostActionString for a list of possible values.

Exception getException()

Returns the exception that was thrown.

String getHostname()

Allows distinguishing the error source if multiple hosts in a single process.

String getPartitionId()

If the error is associated with a particular partition (for example, failed to open the event processor for the partition), the id of the partition. Otherwise, NO_ASSOCIATED_PARTITION.

Field Details

NO_ASSOCIATED_PARTITION

public static final String NO_ASSOCIATED_PARTITION= "N/A"

Method Details

getAction

public String getAction()

See EventProcessorHostActionString for a list of possible values.

Returns:

A short string that indicates what general activity threw the exception.

getException

public Exception getException()

Returns the exception that was thrown.

Returns:

The exception.

getHostname

public String getHostname()

Allows distinguishing the error source if multiple hosts in a single process.

Returns:

The name of the host that experienced the exception.

getPartitionId

public String getPartitionId()

If the error is associated with a particular partition (for example, failed to open the event processor for the partition), the id of the partition. Otherwise, NO_ASSOCIATED_PARTITION.

Returns:

A partition id.

Applies to