Home
last modified time | relevance | path

Searched refs:throwable (Results 1 – 25 of 142) sorted by relevance

123456

/external/guava/guava/src/com/google/common/base/
DThrowables.java61 @Nullable Throwable throwable, Class<X> declaredType) throws X { in propagateIfInstanceOf()
63 if (throwable != null && declaredType.isInstance(throwable)) { in propagateIfInstanceOf()
64 throw declaredType.cast(throwable); in propagateIfInstanceOf()
82 public static void propagateIfPossible(@Nullable Throwable throwable) { in propagateIfPossible() argument
83 propagateIfInstanceOf(throwable, Error.class); in propagateIfPossible()
84 propagateIfInstanceOf(throwable, RuntimeException.class); in propagateIfPossible()
107 @Nullable Throwable throwable, Class<X> declaredType) throws X { in propagateIfPossible()
108 propagateIfInstanceOf(throwable, declaredType); in propagateIfPossible()
109 propagateIfPossible(throwable); in propagateIfPossible()
127 void propagateIfPossible(@Nullable Throwable throwable, in propagateIfPossible() argument
[all …]
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowLog.java41 protected static int e(String tag, String msg, Throwable throwable) { in e() argument
42 return addLog(Log.ERROR, tag, msg, throwable); in e()
51 protected static int d(String tag, String msg, Throwable throwable) { in d() argument
52 return addLog(Log.DEBUG, tag, msg, throwable); in d()
61 protected static int i(String tag, String msg, Throwable throwable) { in i() argument
62 return addLog(Log.INFO, tag, msg, throwable); in i()
71 protected static int v(String tag, String msg, Throwable throwable) { in v() argument
72 return addLog(Log.VERBOSE, tag, msg, throwable); in v()
81 protected static int w(String tag, Throwable throwable) { in w() argument
82 return w(tag, null, throwable); in w()
[all …]
/external/mockito/src/main/java/org/mockito/internal/stubbing/answers/
DThrowsException.java23 private final Throwable throwable; field in ThrowsException
31 public ThrowsException(Throwable throwable) { in ThrowsException() argument
32 this.throwable = throwable; in ThrowsException()
36 if (throwable == null) { in answer()
40 if (MockUtil.isMock(throwable)) { in answer()
41 throw throwable; in answer()
43 Throwable t = throwable.fillInStackTrace(); in answer()
47 throw throwable; in answer()
55 if (throwable == null) { in validateFor()
59 if (throwable instanceof RuntimeException || throwable instanceof Error) { in validateFor()
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/utils/
DLog.java28 public void error(Throwable throwable, String message) { in error() argument
30 System.err.println(throwable.getMessage()); in error()
31 printStackTrace(throwable); in error()
32 } else if (throwable == null) { in error()
35 System.err.println(message + ":" + throwable.getMessage()); in error()
36 printStackTrace(throwable); in error()
40 private void printStackTrace(Throwable throwable) { in printStackTrace() argument
42 throwable.printStackTrace(pw); in printStackTrace()
63 public void error(Throwable throwable, String f) { in error() argument
76 void error(Throwable throwable, String f); in error() argument
[all …]
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowLogTest.java32 Throwable throwable = new Throwable(); in d_shouldLogAppropriately_withThrowable() local
34 Log.d("tag", "msg", throwable); in d_shouldLogAppropriately_withThrowable()
36 assertLogged(Log.DEBUG, "tag", "msg", throwable); in d_shouldLogAppropriately_withThrowable()
48 Throwable throwable = new Throwable(); in e_shouldLogAppropriately_withThrowable() local
50 Log.e("tag", "msg", throwable); in e_shouldLogAppropriately_withThrowable()
52 assertLogged(Log.ERROR, "tag", "msg", throwable); in e_shouldLogAppropriately_withThrowable()
64 Throwable throwable = new Throwable(); in i_shouldLogAppropriately_withThrowable() local
66 Log.i("tag", "msg", throwable); in i_shouldLogAppropriately_withThrowable()
68 assertLogged(Log.INFO, "tag", "msg", throwable); in i_shouldLogAppropriately_withThrowable()
80 Throwable throwable = new Throwable(); in v_shouldLogAppropriately_withThrowable() local
[all …]
/external/mockito/src/main/java/org/mockito/internal/handler/
DNotifiedMethodInvocationReport.java19 private final Throwable throwable; field in NotifiedMethodInvocationReport
32 this.throwable = null; in NotifiedMethodInvocationReport()
42 public NotifiedMethodInvocationReport(Invocation invocation, Throwable throwable) { in NotifiedMethodInvocationReport() argument
45 this.throwable = throwable; in NotifiedMethodInvocationReport()
57 return throwable; in getThrowable()
61 return throwable != null; in threwException()
77 areEqual(throwable, that.throwable); in equals()
83 result = 31 * result + (throwable != null ? throwable.hashCode() : 0); in hashCode()
/external/easymock/src/org/easymock/
DMockControl.java166 public void setThrowable(Throwable throwable) { in setThrowable() argument
169 .andThrow(throwable).once(); in setThrowable()
223 public void setThrowable(Throwable throwable, int times) { in setThrowable() argument
226 .andThrow(throwable).times(times); in setThrowable()
298 public void setDefaultThrowable(Throwable throwable) { in setDefaultThrowable() argument
299 ctrl.setLegacyDefaultThrowable(throwable); in setDefaultThrowable()
376 public void setThrowable(Throwable throwable, int minCount, int maxCount) { in setThrowable() argument
379 .andThrow(throwable).times(minCount, maxCount); in setThrowable()
382 public void setThrowable(Throwable throwable, Range range) { in setThrowable() argument
385 .andThrow(throwable); in setThrowable()
[all …]
/external/dagger2/producers/src/main/java/dagger/producers/
DProduced.java74 public static <T> Produced<T> failed(Throwable throwable) { in failed() argument
75 return new Failed<T>(checkNotNull(throwable)); in failed()
106 private final Throwable throwable; field in Produced.Failed
108 private Failed(Throwable throwable) { in Failed() argument
109 this.throwable = checkNotNull(throwable); in Failed()
113 throw new ExecutionException(throwable); in get()
121 return this.throwable.equals(that.throwable); in equals()
128 return throwable.hashCode(); in hashCode()
/external/vogar/src/vogar/target/junit/
DErrorRunner.java39 private final Throwable throwable; field in ErrorRunner
41 public ErrorRunner(Description description, Throwable throwable) { in ErrorRunner() argument
43 this.throwable = throwable; in ErrorRunner()
47 if (throwable instanceof InitializationError) { in ErrorRunner()
48 InitializationError error = (InitializationError) throwable; in ErrorRunner()
50 throwable.addSuppressed(cause); in ErrorRunner()
63 notifier.fireTestFailure(new Failure(description, throwable)); in run()
/external/easymock/src/org/easymock/internal/
DRecordState.java103 public void andThrow(Throwable throwable) { in andThrow() argument
105 requireValidThrowable(throwable); in andThrow()
109 lastResult = Result.createThrowResult(throwable); in andThrow()
172 public void andStubThrow(Throwable throwable) { in andStubThrow() argument
174 requireValidThrowable(throwable); in andStubThrow()
178 behavior.addStub(lastInvocation, Result.createThrowResult(throwable)); in andStubThrow()
183 public void setDefaultThrowable(Throwable throwable) { in setDefaultThrowable() argument
185 requireValidThrowable(throwable); in setDefaultThrowable()
191 .createThrowResult(throwable)); in setDefaultThrowable()
299 private void requireValidThrowable(Throwable throwable) { in requireValidThrowable() argument
[all …]
DThrowableWrapper.java22 private final Throwable throwable; field in ThrowableWrapper
24 public ThrowableWrapper(final Throwable throwable) { in ThrowableWrapper() argument
25 this.throwable = throwable; in ThrowableWrapper()
29 return throwable; in getThrowable()
/external/droiddriver/src/io/appium/droiddriver/exceptions/
DDroidDriverException.java61 public static DroidDriverException propagate(Throwable throwable) { in propagate() argument
62 if (throwable instanceof RuntimeException) { in propagate()
63 throw (RuntimeException) throwable; in propagate()
65 if (throwable instanceof Error) { in propagate()
66 throw (Error) throwable; in propagate()
68 throw new DroidDriverException(throwable); in propagate()
/external/slf4j/slf4j-ext/src/main/java/org/slf4j/ext/
DXLogger.java157 public <T extends Throwable> T throwing(T throwable) { in throwing() argument
159 …er) logger).log(THROWING_MARKER, FQCN, LocationAwareLogger.ERROR_INT, "throwing", null, throwable); in throwing()
161 return throwable; in throwing()
172 public <T extends Throwable> T throwing(Level level, T throwable) { in throwing() argument
174 …(LocationAwareLogger) logger).log(THROWING_MARKER, FQCN, level.level, "throwing", null, throwable); in throwing()
176 return throwable; in throwing()
185 public void catching(Throwable throwable) { in catching() argument
187 …er) logger).log(CATCHING_MARKER, FQCN, LocationAwareLogger.ERROR_INT, "catching", null, throwable); in catching()
199 public void catching(Level level, Throwable throwable) { in catching() argument
201 …(LocationAwareLogger) logger).log(CATCHING_MARKER, FQCN, level.level, "catching", null, throwable); in catching()
/external/slf4j/slf4j-api/src/main/java/org/slf4j/helpers/
DFormattingTuple.java37 private Throwable throwable; field in FormattingTuple
44 public FormattingTuple(String message, Object[] argArray, Throwable throwable) { in FormattingTuple() argument
46 this.throwable = throwable; in FormattingTuple()
47 if (throwable == null) { in FormattingTuple()
73 return throwable; in getThrowable()
/external/junit-params/src/main/java/junitparams/internal/
DDeferredErrorFrameworkMethod.java15 private final Throwable throwable; field in DeferredErrorFrameworkMethod
18 Throwable throwable) { in DeferredErrorFrameworkMethod() argument
20 this.throwable = throwable; in DeferredErrorFrameworkMethod()
28 throw throwable; in getInvokeStatement()
/external/apache-xml/src/main/java/org/apache/xalan/templates/
DFuncDocument.java283 catch (Throwable throwable) in getDoc()
290 while (throwable in getDoc()
293 throwable = in getDoc()
294 ((org.apache.xml.utils.WrappedRuntimeException) throwable).getException(); in getDoc()
297 if ((throwable instanceof NullPointerException) in getDoc()
298 || (throwable instanceof ClassCastException)) in getDoc()
301 (Exception) throwable); in getDoc()
307 if (throwable instanceof TransformerException) in getDoc()
309 TransformerException spe = (TransformerException) throwable; in getDoc()
345 diagnosticsWriter.println(" (" + throwable.getClass().getName() in getDoc()
[all …]
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DTestThread.java248 } catch (Throwable throwable) { in run()
249 responseQueue.put(new Response(request.methodName, null, throwable)); in run()
276 final Throwable throwable; field in TestThread.Response
278 Response(String methodName, Object result, Throwable throwable) { in Response() argument
281 this.throwable = throwable; in Response()
285 if (throwable != null) { in getResult()
286 throw (AssertionFailedError) new AssertionFailedError().initCause(throwable); in getResult()
292 assertNotNull(throwable); in getThrowable()
293 return throwable; in getThrowable()
/external/vogar/src/vogar/target/junit/junit3/
DTestCaseRunnerFactory.java81 Class<? extends Test> testClass, String name, Throwable throwable) { in createFailingTest() argument
84 return new ThrowingStatement(description, throwable); in createFailingTest()
157 private final Throwable throwable; field in TestCaseRunnerFactory.ThrowingStatement
159 public ThrowingStatement(Description description, Throwable throwable) { in ThrowingStatement() argument
161 this.throwable = throwable; in ThrowingStatement()
166 throw throwable; in evaluate()
/external/guice/extensions/throwingproviders/src/com/google/inject/throwingproviders/
DCheckedProviders.java78 static ThrowingHandler forClass(Class<? extends Throwable> throwable) { in forClass() argument
80 return new ThrowingHandler(throwable.getDeclaredConstructor(), throwable.getName()); in forClass()
85 "Throwable <%s> does not have a no-argument constructor", throwable.getName())); in forClass()
169 TypeLiteral<P> providerType, Class<? extends Throwable> throwable) { in throwing() argument
173 checkThrowable(providerRaw, throwable); in throwing()
175 providerType, Optional.<T>absent(), ThrowingHandler.forClass(throwable)); in throwing()
186 Class<P> providerType, Class<? extends Throwable> throwable) { in throwing() argument
187 return throwing(TypeLiteral.get(providerType), throwable); in throwing()
/external/opencensus-java/contrib/agent/src/main/java/io/opencensus/contrib/agent/instrumentation/
DTraceStrategyImpl.java46 public void endScope(Closeable scope, @Nullable Throwable throwable) { in endScope() argument
49 if (throwable != null) { in endScope()
54 throwable.getMessage() == null in endScope()
55 ? throwable.getClass().getSimpleName() in endScope()
56 : throwable.getMessage())); in endScope()
/external/mockito/src/test/java/org/mockito/internal/stubbing/answers/
DThrowsExceptionTest.java26 } catch (Throwable throwable) { in should_raise_wanted_throwable()
27 … assertThat(throwable).isInstanceOf(IllegalStateException.class).hasMessage("my dear throwable"); in should_raise_wanted_throwable()
36 } catch (Throwable throwable) { in should_throw_mock_exception_without_stacktrace()
37 assertThat(throwable.getStackTrace()).describedAs("no stack trace, it's mock").isNull(); in should_throw_mock_exception_without_stacktrace()
53 } catch (Throwable throwable) { in should_fill_in_exception_stacktrace()
55 throwable.printStackTrace(); in should_fill_in_exception_stacktrace()
/external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/share/
DJPDALogWriter.java128 public void printError(String message, Throwable throwable) { in printError() argument
132 logStream.printStackTrace(getErrorPrefix() + message, throwable); in printError() local
142 public void printError(Throwable throwable) { in printError() argument
143 logStream.printStackTrace(null, throwable); in printError()
260 Throwable throwable) { in printStackTrace() argument
264 throwable.printStackTrace(outputStream); in printStackTrace()
/external/apache-harmony/jdwp/src/test/java/org/apache/harmony/jpda/tests/framework/
DTestErrorException.java60 public TestErrorException(String message, Throwable throwable) { in TestErrorException() argument
61 super(message, throwable); in TestErrorException()
69 public TestErrorException(Throwable throwable) { in TestErrorException() argument
70 super(throwable); in TestErrorException()
/external/mockito/src/test/java/org/mockitoutil/
DSafeJUnitRuleTest.java86 } catch (AssertionError throwable) { in expected_exception_message_did_not_match()
87 Assertions.assertThat(throwable).hasMessageContaining("Expecting message"); in expected_exception_message_did_not_match()
103 } catch (AssertionError throwable) { in expected_exception_type_did_not_match()
104 Assertions.assertThat(throwable).hasMessageContaining("but was:"); in expected_exception_type_did_not_match()
124 } catch (AssertionError throwable) { in expected_exception_assert_did_not_match()
125 assertEquals(throwable.getMessage(), "x"); in expected_exception_assert_did_not_match()
/external/guava/guava/src/com/google/common/io/
DCloser.java208 Throwable throwable = thrown; in close() local
216 if (throwable == null) { in close()
217 throwable = e; in close()
219 suppressor.suppress(closeable, throwable, e); in close()
224 if (thrown == null && throwable != null) { in close()
225 Throwables.propagateIfPossible(throwable, IOException.class); in close()
226 throw new AssertionError(throwable); // not possible in close()

123456