Package org.hl7.fhir.r4.utils.client
Class EFhirClientException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.hl7.fhir.r4.utils.client.EFhirClientException
-
- All Implemented Interfaces:
Serializable
public class EFhirClientException extends RuntimeException
FHIR client exception. FHIR API exception will be wrapped in FHIR client exceptions. OperationOutcome errors resulting from the server can be access by calling:if(e.hasServerErrors()) { Listerrors = e.getServerErrors(); //process errors... } - Author:
- Claude Nanjo
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EFhirClientException(Exception cause)EFhirClientException(String message)EFhirClientException(String message, Exception cause)EFhirClientException(String message, List<OperationOutcome> serverErrors)EFhirClientException(String message, OperationOutcome serverError)Generate EFhirClientException which include a message indicating the cause of the exception along with any OperationOutcome server error that may have resulted.EFhirClientException(OperationOutcome serverError)Generate EFhirClientException indicating the cause of the exception along with any OperationOutcome server error the server may have generated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<OperationOutcome>getServerErrors()Method returns all OperationOutcome server errors that are associated with this exception.booleanhasServerErrors()Method returns true if exception contains server OperationOutcome errors in payload.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
EFhirClientException
public EFhirClientException(String message)
-
EFhirClientException
public EFhirClientException(String message, List<OperationOutcome> serverErrors)
-
EFhirClientException
public EFhirClientException(Exception cause)
-
EFhirClientException
public EFhirClientException(String message, Exception cause)
-
EFhirClientException
public EFhirClientException(String message, OperationOutcome serverError)
Generate EFhirClientException which include a message indicating the cause of the exception along with any OperationOutcome server error that may have resulted.- Parameters:
message-serverError-
-
EFhirClientException
public EFhirClientException(OperationOutcome serverError)
Generate EFhirClientException indicating the cause of the exception along with any OperationOutcome server error the server may have generated. A default message of "One or more server side errors have occurred during this operation. Refer to e.getServerErrors() for additional details." will be returned to users.- Parameters:
message-serverError-
-
-
Method Detail
-
getServerErrors
public List<OperationOutcome> getServerErrors()
Method returns all OperationOutcome server errors that are associated with this exception.- Returns:
-
hasServerErrors
public boolean hasServerErrors()
Method returns true if exception contains server OperationOutcome errors in payload.- Returns:
-
-