@Test public void sendsTheExceptionCatchToTheCrashReporterApiClient() { NullPointerException nullPointerException = new NullPointerException(); BrokenRunnable brokenRunnable = new BrokenRunnable(nullPointerException); safetyNet.executeSafely(brokenRunnable); verify(apiClient).reportError(nullPointerException); }
public void executeSafely(Runnable runnable) { try { runnable.run(); } catch (Throwable t) { Logger.e("Exception catch", t); reportException(t); } }
SafetyNet { public void executeSafely(Runnable runnable) { try { runnable.run(); } catch (Throwable t) { Logger.e("Exception catch", t); reportException(t); } } }
SafetyNet { public void executeSafely(Runnable runnable) { try { runnable.run(); } catch (Throwable t) { Logger.e("Exception catch", t); reportException(t); } } SafetyNet(CrashReporterApiClient crashReporterApiClient);   SafetyNet(CrashReporterApiClient crashReporterApiClient, boolean forceMainThreadReport); }
SafetyNet { public void executeSafely(Runnable runnable) { try { runnable.run(); } catch (Throwable t) { Logger.e("Exception catch", t); reportException(t); } } SafetyNet(CrashReporterApiClient crashReporterApiClient);   SafetyNet(CrashReporterApiClient crashReporterApiClient, boolean forceMainThreadReport); void executeSafelyOnNewThread(final Runnable runnable); void executeSafely(Runnable runnable); }
SafetyNet { public void executeSafely(Runnable runnable) { try { runnable.run(); } catch (Throwable t) { Logger.e("Exception catch", t); reportException(t); } } SafetyNet(CrashReporterApiClient crashReporterApiClient);   SafetyNet(CrashReporterApiClient crashReporterApiClient, boolean forceMainThreadReport); void executeSafelyOnNewThread(final Runnable runnable); void executeSafely(Runnable runnable);  }