Class NetworkCallError
- java.lang.Object
-
- com.azure.android.core.test.models.NetworkCallError
-
public class NetworkCallError extends java.lang.Object
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
Constructors Constructor Description NetworkCallError()
Empty constructor used by deserialization.NetworkCallError(java.lang.Throwable throwable)
Constructs the class setting the throwable and its class name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Throwable
get()
void
setClassName(java.lang.String className)
Sets the name of the class of the throwable.void
setErrorMessage(java.lang.String errorMessage)
Sets the error message of the class of the throwable.void
setThrowable(java.lang.Throwable throwable)
Sets the throwable that was thrown during a network call.
-
-
-
Constructor Detail
-
NetworkCallError
public NetworkCallError()
Empty constructor used by deserialization.
-
NetworkCallError
public NetworkCallError(java.lang.Throwable throwable)
Constructs the class setting the throwable and its class name.- Parameters:
throwable
- Throwable thrown during a network call.
-
-
Method Detail
-
get
public java.lang.Throwable get()
- Returns:
- the thrown throwable as the class it was thrown as by converting is using its class name.
-
setThrowable
public void setThrowable(java.lang.Throwable throwable)
Sets the throwable that was thrown during a network call.- Parameters:
throwable
- Throwable that was thrown.
-
setClassName
public void setClassName(java.lang.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:
className
- Class name of the throwable.
-
setErrorMessage
public void setErrorMessage(java.lang.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:
errorMessage
- Error msg from the exception.
-
-