EventHubException Class

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

public class EventHubException
extends Exception

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

Constructor Summary

Constructor Description
EventHubException(boolean isTransient, String message)
EventHubException(boolean isTransient, String message, Throwable cause)
EventHubException(boolean isTransient, 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)

Methods inherited from java.lang.Object

Methods inherited from java.lang.Throwable

Constructor Details

EventHubException

public EventHubException(boolean isTransient, String message)

Parameters:

isTransient
message

EventHubException

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

Parameters:

isTransient
message
cause

EventHubException

public EventHubException(boolean isTransient, 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()

Overrides:

EventHubException.getMessage()

setContext

public void setContext(ErrorContext errorContext)

Parameters:

errorContext

Applies to