--- /dev/null
+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();
+ }
+}