Home
last modified time | relevance | path

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

123456789

/external/guava/android/guava/src/com/google/common/base/
DThrowables.java73 Throwable throwable, Class<X> declaredType) throws X { in throwIfInstanceOf() argument
74 checkNotNull(throwable); in throwIfInstanceOf()
75 if (declaredType.isInstance(throwable)) { in throwIfInstanceOf()
76 throw declaredType.cast(throwable); in throwIfInstanceOf()
102 @NullableDecl Throwable throwable, Class<X> declaredType) throws X { in propagateIfInstanceOf()
103 if (throwable != null) { in propagateIfInstanceOf()
104 throwIfInstanceOf(throwable, declaredType); in propagateIfInstanceOf()
127 public static void throwIfUnchecked(Throwable throwable) { in throwIfUnchecked() argument
128 checkNotNull(throwable); in throwIfUnchecked()
129 if (throwable instanceof RuntimeException) { in throwIfUnchecked()
[all …]
/external/guava/guava/src/com/google/common/base/
DThrowables.java73 Throwable throwable, Class<X> declaredType) throws X { in throwIfInstanceOf() argument
74 checkNotNull(throwable); in throwIfInstanceOf()
75 if (declaredType.isInstance(throwable)) { in throwIfInstanceOf()
76 throw declaredType.cast(throwable); in throwIfInstanceOf()
102 @Nullable Throwable throwable, Class<X> declaredType) throws X { in propagateIfInstanceOf()
103 if (throwable != null) { in propagateIfInstanceOf()
104 throwIfInstanceOf(throwable, declaredType); in propagateIfInstanceOf()
127 public static void throwIfUnchecked(Throwable throwable) { in throwIfUnchecked() argument
128 checkNotNull(throwable); in throwIfUnchecked()
129 if (throwable instanceof RuntimeException) { in throwIfUnchecked()
[all …]
/external/exoplayer/tree/library/common/src/main/java/com/google/android/exoplayer2/util/
DLog.java90 public static void d(String tag, String message, @Nullable Throwable throwable) { in d() argument
91 d(tag, appendThrowableString(message, throwable)); in d()
102 public static void i(String tag, String message, @Nullable Throwable throwable) { in i() argument
103 i(tag, appendThrowableString(message, throwable)); in i()
114 public static void w(String tag, String message, @Nullable Throwable throwable) { in w() argument
115 w(tag, appendThrowableString(message, throwable)); in w()
126 public static void e(String tag, String message, @Nullable Throwable throwable) { in e() argument
127 e(tag, appendThrowableString(message, throwable)); in e()
142 public static String getThrowableString(@Nullable Throwable throwable) { in getThrowableString() argument
143 if (throwable == null) { in getThrowableString()
[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/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/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/java/dagger/producers/
DProduced.java77 public static <T> Produced<T> failed(Throwable throwable) { in failed() argument
78 return new Failed<T>(checkNotNull(throwable)); in failed()
118 private final Throwable throwable; field in Produced.Failed
120 private Failed(Throwable throwable) { in Failed() argument
121 this.throwable = checkNotNull(throwable); in Failed()
126 throw new ExecutionException(throwable); in get()
135 return this.throwable.equals(that.throwable); in equals()
143 return throwable.hashCode(); in hashCode()
148 return "Produced[failed with " + throwable.getClass().getCanonicalName() + "]"; in toString()
/external/connectedappssdk/sdk/src/main/java/com/google/android/enterprise/connectedapps/internal/
DBackgroundExceptionThrower.java27 RuntimeException throwable; field in BackgroundExceptionThrower.ThrowingRunnable
29 ThrowingRunnable(RuntimeException throwable) { in ThrowingRunnable() argument
30 this.throwable = throwable; in ThrowingRunnable()
35 throw throwable; in run()
40 public static void throwInBackground(RuntimeException throwable) { in throwInBackground() argument
42 new Handler(Looper.getMainLooper()).postDelayed(new ThrowingRunnable(throwable), 1000); in throwInBackground()
/external/jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/std/
DThrowableDeserializer.java83 Object throwable = null; in deserializeFromObject() local
93 if (throwable != null) { in deserializeFromObject()
94 prop.deserializeAndSet(p, ctxt, throwable); in deserializeFromObject()
111 throwable = _valueInstantiator.createFromString(ctxt, p.getValueAsString()); in deserializeFromObject()
116 prop.set(throwable, pending[i+1]); in deserializeFromObject()
129 _anySetter.deserializeAndSet(p, ctxt, throwable, propName); in deserializeFromObject()
136 handleUnknownProperty(p, ctxt, throwable, propName); in deserializeFromObject()
139 if (throwable == null) { in deserializeFromObject()
147 throwable = _valueInstantiator.createFromString(ctxt, null); in deserializeFromObject()
149 throwable = _valueInstantiator.createUsingDefault(ctxt); in deserializeFromObject()
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/utils/
DLog.java32 Throwable throwable = throwableSupplier.get(); in error() local
35 System.err.println(throwable.getMessage()); in error()
36 printStackTrace(throwable); in error()
37 } else if (throwable == null) { in error()
40 System.err.println(message + ":" + throwable.getMessage()); in error()
41 printStackTrace(throwable); in error()
45 private void printStackTrace(Throwable throwable) { in printStackTrace() argument
47 throwable.printStackTrace(pw); in printStackTrace()
123 public static void error(Throwable throwable) { in error() argument
124 CURRENT_ADAPTER.error(() -> throwable, null); in error()
[all …]
/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/cbor-java/src/test/java/co/nstant/in/cbor/
DCborExceptionTest.java16 Throwable throwable = new Throwable(); in shouldHaveThrowable() local
17 CborException cborException = new CborException(throwable); in shouldHaveThrowable()
18 Assert.assertEquals(throwable, cborException.getCause()); in shouldHaveThrowable()
23 Throwable throwable = new Throwable(); in shouldHaveMessageAndThrowable() local
24 CborException cborException = new CborException("message", throwable); in shouldHaveMessageAndThrowable()
26 Assert.assertEquals(throwable, cborException.getCause()); in shouldHaveMessageAndThrowable()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/exc/
DStackTraceElementTest.java11 public String throwable; field in StackTraceElementTest.ErrorObject
19 public ErrorObject(Throwable throwable) { in ErrorObject() argument
20 this.throwable = throwable.getClass().getName(); in ErrorObject()
21 message = throwable.getMessage(); in ErrorObject()
22 stackTrace = throwable.getStackTrace(); in ErrorObject()
/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/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/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/guava/android/guava/src/com/google/common/util/concurrent/
DAggregateFuture.java191 private void handleException(Throwable throwable) { in handleException() argument
192 checkNotNull(throwable); in handleException()
197 boolean completedWithFailure = setException(throwable); in handleException()
201 boolean firstTimeSeeingThisException = addCausalChain(getOrInitSeenExceptions(), throwable); in handleException()
203 log(throwable); in handleException()
213 if (throwable instanceof Error) { in handleException()
221 log(throwable); in handleException()
225 private static void log(Throwable throwable) { in log() argument
227 (throwable instanceof Error) in log()
230 logger.log(SEVERE, message, throwable); in log()
DAbstractCatchingFuture.java84 Throwable throwable = null; in run() local
87 throwable = in run()
91 if (throwable == null) { in run()
95 throwable = e.getCause(); in run()
96 if (throwable == null) { in run()
97 throwable = in run()
106 throwable = e; in run()
109 if (throwable == null) { in run()
114 if (!isInstanceOfThrowableClass(throwable, localExceptionType)) { in run()
121 X castThrowable = (X) throwable; in run()
[all …]
/external/guava/guava/src/com/google/common/util/concurrent/
DAggregateFuture.java191 private void handleException(Throwable throwable) { in handleException() argument
192 checkNotNull(throwable); in handleException()
197 boolean completedWithFailure = setException(throwable); in handleException()
201 boolean firstTimeSeeingThisException = addCausalChain(getOrInitSeenExceptions(), throwable); in handleException()
203 log(throwable); in handleException()
213 if (throwable instanceof Error) { in handleException()
221 log(throwable); in handleException()
225 private static void log(Throwable throwable) { in log() argument
227 (throwable instanceof Error) in log()
230 logger.log(SEVERE, message, throwable); in log()
DAbstractCatchingFuture.java84 Throwable throwable = null; in run() local
87 throwable = in run()
91 if (throwable == null) { in run()
95 throwable = e.getCause(); in run()
96 if (throwable == null) { in run()
97 throwable = in run()
106 throwable = e; in run()
109 if (throwable == null) { in run()
114 if (!isInstanceOfThrowableClass(throwable, localExceptionType)) { in run()
121 X castThrowable = (X) throwable; in run()
[all …]
/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/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()

123456789