Errors during parsing of the error-message are wrapped
[facebook-errors] / src / main / java / de / juplo / facebook / errors / ErrorResponseParsingErrorException.java
1 package de.juplo.facebook.errors;
2
3
4 import org.springframework.http.HttpHeaders;
5 import org.springframework.http.HttpStatus;
6
7
8
9
10 /**
11  * Exception that is thrown, if anything went wrong while parsing the
12  * error-response.
13  *
14  * @author Kai Moritz
15  */
16 public class ErrorResponseParsingErrorException extends GraphApiException
17 {
18   public final Exception cause;
19
20
21   protected  ErrorResponseParsingErrorException(
22       HttpStatus status,
23       HttpHeaders headers,
24       Exception cause
25       )
26   {
27     super(status, headers, new FacebookErrorMessage(cause));
28     this.cause = cause;
29   }
30
31
32
33   @Override
34   public String toString()
35   {
36     return "Error during parsing the error-response: " + cause.toString();
37   }
38 }