X-Git-Url: https://juplo.de/gitweb/?p=facebook-errors;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Ffacebook%2Ferrors%2FErrorResponseParsingErrorException.java;fp=src%2Fmain%2Fjava%2Fde%2Fjuplo%2Ffacebook%2Ferrors%2FErrorResponseParsingErrorException.java;h=60dcb6be6152020e4f51ff8e435e95abd80339d2;hp=0000000000000000000000000000000000000000;hb=1c809f83874d51c696721f265115ee11f99e607a;hpb=8079d646addc5206f64bfb213d018a2fa94444d3 diff --git a/src/main/java/de/juplo/facebook/errors/ErrorResponseParsingErrorException.java b/src/main/java/de/juplo/facebook/errors/ErrorResponseParsingErrorException.java new file mode 100644 index 0000000..60dcb6b --- /dev/null +++ b/src/main/java/de/juplo/facebook/errors/ErrorResponseParsingErrorException.java @@ -0,0 +1,38 @@ +package de.juplo.facebook.errors; + + +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; + + + + +/** + * Exception that is thrown, if anything went wrong while parsing the + * error-response. + * + * @author Kai Moritz + */ +public class ErrorResponseParsingErrorException extends GraphApiException +{ + public final Exception cause; + + + protected ErrorResponseParsingErrorException( + HttpStatus status, + HttpHeaders headers, + Exception cause + ) + { + super(status, headers, new FacebookErrorMessage(cause)); + this.cause = cause; + } + + + + @Override + public String toString() + { + return "Error during parsing the error-response: " + cause.toString(); + } +}