Class TextAnalyticsException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.azure.core.exception.AzureException
-
- com.azure.ai.textanalytics.models.TextAnalyticsException
-
- All Implemented Interfaces:
Serializable
public class TextAnalyticsException extends com.azure.core.exception.AzureException
General exception for Text Analytics related failures.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TextAnalyticsException(String message, TextAnalyticsErrorCode errorCode, String target)
Initializes a new instance of theTextAnalyticsException
class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TextAnalyticsErrorCode
getErrorCode()
Gets theTextAnalyticsErrorCode
for this exception.com.azure.core.util.IterableStream<TextAnalyticsError>
getErrors()
Get the error information list fot this exception.String
getMessage()
String
getTarget()
Gets the target for this exception.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
TextAnalyticsException
public TextAnalyticsException(String message, TextAnalyticsErrorCode errorCode, String target)
Initializes a new instance of theTextAnalyticsException
class.- Parameters:
message
- Text contains any additional details of the exception.errorCode
- The service returned error code value.target
- The target for this exception.
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getTarget
public String getTarget()
Gets the target for this exception.- Returns:
- The target for this exception.
-
getErrorCode
public TextAnalyticsErrorCode getErrorCode()
Gets theTextAnalyticsErrorCode
for this exception.- Returns:
- The
TextAnalyticsErrorCode
for this exception.
-
getErrors
public com.azure.core.util.IterableStream<TextAnalyticsError> getErrors()
Get the error information list fot this exception.- Returns:
IterableStream
ofTextAnalyticsError
.
-
-