NetworkCallError Class
- java.
lang. Object - com.
azure. core. test. models. NetworkCallError
- com.
public class NetworkCallError
This class represents a caught throwable during a network call. It is used to serialize exceptions that were thrown during the pipeline and deserialize them back into their actual throwable class when running in playback mode.
Constructor Summary
Constructor | Description |
---|---|
NetworkCallError() |
Empty constructor used by deserialization. |
NetworkCallError(Throwable throwable) |
Constructs the class setting the throwable and its class name. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Throwable | get() |
void |
setClassName(String className)
Sets the name of the class of the throwable. |
void |
setErrorMessage(String errorMessage)
Sets the error message of the class of the throwable. |
void |
setThrowable(Throwable throwable)
Sets the throwable that was thrown during a network call. |
Methods inherited from java.lang.Object
Constructor Details
NetworkCallError
public NetworkCallError()
Empty constructor used by deserialization.
NetworkCallError
public NetworkCallError(Throwable throwable)
Constructs the class setting the throwable and its class name.
Parameters:
Method Details
get
public Throwable get()
Returns:
setClassName
public void setClassName(String className)
Sets the name of the class of the throwable. This is used during deserialization the construct the throwable as the actual class that was thrown.
Parameters:
setErrorMessage
public void setErrorMessage(String errorMessage)
Sets the error message of the class of the throwable. This is used during deserialization the construct the throwable as the actual class that was thrown.
Parameters:
setThrowable
public void setThrowable(Throwable throwable)
Sets the throwable that was thrown during a network call.
Parameters:
Applies to
Azure SDK for Java