EventHubException Class

  • java.lang.Object
    • Exception
      • com.microsoft.azure.eventhubs.EventHubException

public class EventHubException

This is the base exception that service bus will produce for all error cases.

Constructor Summary

Constructor Description
EventHubException(final boolean isTransient, final String message)
EventHubException(final boolean isTransient, final String message, final Throwable cause)
EventHubException(final boolean isTransient, final Throwable cause)

Method Summary

Modifier and Type Method and Description
ErrorContext getContext()
boolean getIsTransient()

A boolean indicating if the exception is a transient error or not.

String getMessage()
void setContext(ErrorContext errorContext)

Constructor Details

EventHubException

public EventHubException(final boolean isTransient, final String message)

Parameters:

isTransient
message

EventHubException

public EventHubException(final boolean isTransient, final String message, final Throwable cause)

Parameters:

isTransient
message
cause

EventHubException

public EventHubException(final boolean isTransient, final Throwable cause)

Parameters:

isTransient
cause

Method Details

getContext

public ErrorContext getContext()

getIsTransient

public boolean getIsTransient()

A boolean indicating if the exception is a transient error or not.

Returns:

returns true when user can retry the operation that generated the exception without additional intervention.

getMessage

public String getMessage()

setContext

public void setContext(ErrorContext errorContext)

Parameters:

errorContext

Applies to