Class ErrorManagerService
java.lang.Object
com.github.badpop.jcoinbase.service.ErrorManagerService
public class ErrorManagerService
extends java.lang.Object
An utility class to centralize error management when we need to log error and throw exceptions
-
Constructor Summary
Constructors Constructor Description ErrorManagerService()
-
Method Summary
Modifier and Type Method Description void
manageOnError(JCoinbaseException jcex, java.lang.String message, java.lang.Object... logParams)
Log a parameterized message and throws the given exceptionvoid
manageOnError(JCoinbaseException jcex, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... logParams)
Log a parameterized message with a throwable and throws the given exceptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ErrorManagerService
public ErrorManagerService()
-
-
Method Details
-
manageOnError
public void manageOnError(JCoinbaseException jcex, java.lang.String message, java.lang.Object... logParams)Log a parameterized message and throws the given exception- Parameters:
jcex
- a JCoinbase exception that must be thrownmessage
- the message we want to loglogParams
- the message parameters to log
-
manageOnError
public void manageOnError(JCoinbaseException jcex, java.lang.String message, java.lang.Throwable throwable, java.lang.Object... logParams)Log a parameterized message with a throwable and throws the given exception- Parameters:
jcex
- a JCoinbase exception that must be thrownmessage
- the message we want to logthrowable
- a throwable that we want to loglogParams
- the message parameters to log
-