Package com.chargehound.errors
Class ChargehoundExceptionFactory
java.lang.Object
com.chargehound.errors.ChargehoundExceptionFactory
public class ChargehoundExceptionFactory
extends java.lang.Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChargehoundExceptionFactory.ChargehoundErrorDetailsDefine a class to parse the error message, status, and type.static classChargehoundExceptionFactory.ChargehoundErrorJsonDefine a class to parse the error Json. -
Constructor Summary
Constructors Constructor Description ChargehoundExceptionFactory() -
Method Summary
Modifier and Type Method Description ChargehoundExceptiongenericChargehoundException(java.lang.Exception error)Create a Chargehound exception from a generic exception.ChargehoundExceptionhttpResponseException(com.google.api.client.http.HttpResponseException error)Create a Chargehound exception from an Http exception.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ChargehoundExceptionFactory
public ChargehoundExceptionFactory()
-
-
Method Details
-
httpResponseException
public ChargehoundException httpResponseException(com.google.api.client.http.HttpResponseException error)Create a Chargehound exception from an Http exception.- Parameters:
error- an HTTP exception- Returns:
- ChargehoundException
-
genericChargehoundException
Create a Chargehound exception from a generic exception.- Parameters:
error- any exception exception- Returns:
- ChargehoundException
-