-
public class ErrorCatcher
-
-
Method Summary
Modifier and Type Method Description static voidtryCatch(Runnable runnable)Catches any exception and logs the error static voidassertThatInit()static voidtryCatchAndInitCheck(Runnable runnable, Consumer<GliaException> callback)Does same as tryCatch but also check if SDK has been initialized static voidtryCatchAndInitCheck(Runnable runnable, RequestCallback<out Object> callback)Does same as tryCatch but also check if SDK has been initialized static voidtryCatch(Runnable runnable, Consumer<GliaException> onResult)Catches any exception and logs the error static voidtryCatch(Runnable runnable, RequestCallback<out Object> onResult)Catches any exception and logs the error static voidassertThatIsOnMainThread()static voidreportError(Consumer<GliaException> callback, GliaException.Cause cause, String message)static voidreportError(RequestCallback<out Object> callback, GliaException.Cause cause, String message)static voidreportError(Consumer<GliaException> callback, Throwable error)static voidreportError(RequestCallback<out Object> callback, Throwable error)static <T> voidreportSuccess(RequestCallback<T> callback, T result)-
-
Method Detail
-
assertThatInit
static void assertThatInit()
-
tryCatchAndInitCheck
static void tryCatchAndInitCheck(Runnable runnable, Consumer<GliaException> callback)
Does same as tryCatch but also check if SDK has been initialized
-
tryCatchAndInitCheck
static void tryCatchAndInitCheck(Runnable runnable, RequestCallback<out Object> callback)
Does same as tryCatch but also check if SDK has been initialized
-
tryCatch
static void tryCatch(Runnable runnable, Consumer<GliaException> onResult)
Catches any exception and logs the error
-
tryCatch
static void tryCatch(Runnable runnable, RequestCallback<out Object> onResult)
Catches any exception and logs the error
-
assertThatIsOnMainThread
static void assertThatIsOnMainThread()
-
reportError
static void reportError(Consumer<GliaException> callback, GliaException.Cause cause, String message)
-
reportError
static void reportError(RequestCallback<out Object> callback, GliaException.Cause cause, String message)
-
reportError
static void reportError(Consumer<GliaException> callback, Throwable error)
-
reportError
static void reportError(RequestCallback<out Object> callback, Throwable error)
-
reportSuccess
static <T> void reportSuccess(RequestCallback<T> callback, T result)
-
-
-
-