ServiceBusException Class

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • com.microsoft.azure.servicebus.primitives.ServiceBusException

public class ServiceBusException
extends Exception

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

Constructor Summary

Constructor Description
ServiceBusException(boolean isTransient)
ServiceBusException(boolean isTransient, String message)
ServiceBusException(boolean isTransient, String message, Throwable cause)
ServiceBusException(boolean isTransient, Throwable cause)

Method Summary

Modifier and Type Method and Description
com.microsoft.azure.servicebus.primitives.ErrorContext getContext()
boolean getIsTransient()

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

String getMessage()

Methods inherited from java.lang.Object

Methods inherited from java.lang.Throwable

Constructor Details

ServiceBusException

public ServiceBusException(boolean isTransient)

Parameters:

isTransient

ServiceBusException

public ServiceBusException(boolean isTransient, String message)

Parameters:

isTransient
message

ServiceBusException

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

Parameters:

isTransient
message
cause

ServiceBusException

public ServiceBusException(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:

ServiceBusException.getMessage()

Applies to