Package com.azure.messaging.servicebus
Class ServiceBusException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.azure.core.exception.AzureException
com.azure.messaging.servicebus.ServiceBusException
- All Implemented Interfaces:
Serializable
public final class ServiceBusException
extends com.azure.core.exception.AzureException
Exception containing additional information about the operation that caused the error.
-
Constructor Summary
ConstructorDescriptionServiceBusException
(Throwable throwable, ServiceBusErrorSource errorSource) Creates an instance containing the error and the operation that created the error. -
Method Summary
Modifier and TypeMethodDescriptionGets theServiceBusFailureReason
in case of any errors.boolean
Gets whether the exception is a transient error.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ServiceBusException
Creates an instance containing the error and the operation that created the error.- Parameters:
throwable
- The exception that occurred.errorSource
- The Service Bus operation which caused the error.
-
-
Method Details
-
getReason
Gets theServiceBusFailureReason
in case of any errors.- Returns:
- the
ServiceBusFailureReason
-
isTransient
public boolean isTransient()Gets whether the exception is a transient error.- Returns:
true
when user can retry the operation that generated the exception without additional intervention; false otherwise.
-