Home
last modified time | relevance | path

Searched refs:ex (Results 1 – 25 of 590) sorted by relevance

12345678910>>...24

/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidMonitorTest.java41 } catch (InterruptedException ex) { in testWaitArgumentsTest()
43 ex); in testWaitArgumentsTest()
44 } catch (Exception ex) { in testWaitArgumentsTest()
46 "Object.wait() with good arguments", ex); in testWaitArgumentsTest()
56 } catch (InterruptedException ex) { in testWaitArgumentsTest()
57 throw new RuntimeException("bad Object.wait() interrupted", ex); in testWaitArgumentsTest()
58 } catch (IllegalArgumentException ex) { in testWaitArgumentsTest()
60 } catch (Exception ex) { in testWaitArgumentsTest()
62 "Object.wait() with bad arguments", ex); in testWaitArgumentsTest()
74 } catch (InterruptedException ex) { in testWaitArgumentsTest()
[all …]
DClassCastExceptionTest.java31 } catch (ClassCastException ex) { in testClassCast()
32 assertEquals("Cannot cast java.lang.Exception to java.lang.String", ex.getMessage()); in testClassCast()
40 } catch (ClassCastException ex) { in testClassAsSubclass()
42 ex.getMessage()); in testClassAsSubclass()
54 } catch (ClassCastException ex) { in testEnumMapPut()
55 assertNotNull(ex.getMessage()); in testEnumMapPut()
64 } catch (ClassCastException ex) { in testMiniEnumSetAdd()
65 assertNotNull(ex.getMessage()); in testMiniEnumSetAdd()
75 } catch (ClassCastException ex) { in testMiniEnumSetAddAll()
76 assertNotNull(ex.getMessage()); in testMiniEnumSetAddAll()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/
DUnsupportedCharsetExceptionTest.java33 UnsupportedCharsetException ex = new UnsupportedCharsetException( in testConstructor() local
35 assertTrue(ex instanceof IllegalArgumentException); in testConstructor()
36 assertNull(ex.getCause()); in testConstructor()
37 assertEquals(ex.getCharsetName(), "impossible"); in testConstructor()
38 assertTrue(ex.getMessage().indexOf("impossible") != -1); in testConstructor()
40 ex = new UnsupportedCharsetException("ascii"); in testConstructor()
41 assertNull(ex.getCause()); in testConstructor()
42 assertEquals(ex.getCharsetName(), "ascii"); in testConstructor()
43 assertTrue(ex.getMessage().indexOf("ascii") != -1); in testConstructor()
45 ex = new UnsupportedCharsetException(""); in testConstructor()
[all …]
DIllegalCharsetNameExceptionTest.java33 IllegalCharsetNameException ex = new IllegalCharsetNameException( in testConstructor() local
35 assertTrue(ex instanceof IllegalArgumentException); in testConstructor()
36 assertNull(ex.getCause()); in testConstructor()
37 assertEquals(ex.getCharsetName(), "impossible"); in testConstructor()
38 assertTrue(ex.getMessage().indexOf("impossible") != -1); in testConstructor()
40 ex = new IllegalCharsetNameException("ascii"); in testConstructor()
41 assertNull(ex.getCause()); in testConstructor()
42 assertEquals(ex.getCharsetName(), "ascii"); in testConstructor()
43 assertTrue(ex.getMessage().indexOf("ascii") != -1); in testConstructor()
45 ex = new IllegalCharsetNameException(""); in testConstructor()
[all …]
DUnmappableCharacterExceptionTest.java34 UnmappableCharacterException ex = new UnmappableCharacterException(3); in testConstructor() local
35 assertTrue(ex instanceof CharacterCodingException); in testConstructor()
36 assertNull(ex.getCause()); in testConstructor()
37 assertEquals(ex.getInputLength(), 3); in testConstructor()
38 assertTrue(ex.getMessage().indexOf("3") != -1); in testConstructor()
40 ex = new UnmappableCharacterException(-3); in testConstructor()
41 assertNull(ex.getCause()); in testConstructor()
42 assertEquals(ex.getInputLength(), -3); in testConstructor()
43 assertTrue(ex.getMessage().indexOf("-3") != -1); in testConstructor()
45 ex = new UnmappableCharacterException(0); in testConstructor()
[all …]
DMalformedInputExceptionTest.java34 MalformedInputException ex = new MalformedInputException(3); in testConstructor() local
35 assertTrue(ex instanceof CharacterCodingException); in testConstructor()
36 assertNull(ex.getCause()); in testConstructor()
37 assertEquals(ex.getInputLength(), 3); in testConstructor()
38 assertTrue(ex.getMessage().indexOf("3") != -1); in testConstructor()
40 ex = new MalformedInputException(-3); in testConstructor()
41 assertNull(ex.getCause()); in testConstructor()
42 assertEquals(ex.getInputLength(), -3); in testConstructor()
43 assertTrue(ex.getMessage().indexOf("-3") != -1); in testConstructor()
45 ex = new MalformedInputException(0); in testConstructor()
[all …]
DCoderResultTest.java62 } catch (BufferOverflowException ex) { in testConstants()
68 } catch (UnsupportedOperationException ex) { in testConstants()
82 } catch (BufferUnderflowException ex) { in testConstants()
88 } catch (UnsupportedOperationException ex) { in testConstants()
156 } catch (UnsupportedOperationException ex) { in testLength()
162 } catch (UnsupportedOperationException ex) { in testLength()
186 } catch (IllegalArgumentException ex) { in testMalformedForLength()
192 } catch (IllegalArgumentException ex) { in testMalformedForLength()
211 } catch (IllegalArgumentException ex) { in testUnmappableForLength()
217 } catch (IllegalArgumentException ex) { in testUnmappableForLength()
[all …]
/libcore/luni/src/test/java/libcore/java/time/format/
DDateTimeParseExceptionTest.java31 DateTimeParseException ex = in test_constructor_message_parsedData_errorIndex() local
33 assertEquals("message", ex.getMessage()); in test_constructor_message_parsedData_errorIndex()
34 assertEquals("parsedData", ex.getParsedString()); in test_constructor_message_parsedData_errorIndex()
35 assertEquals(42, ex.getErrorIndex()); in test_constructor_message_parsedData_errorIndex()
36 assertNull(ex.getCause()); in test_constructor_message_parsedData_errorIndex()
42 DateTimeParseException ex = in test_constructor_message_parsedData_errorIndex_cause() local
44 assertEquals("message", ex.getMessage()); in test_constructor_message_parsedData_errorIndex_cause()
45 assertEquals("parsedData", ex.getParsedString()); in test_constructor_message_parsedData_errorIndex_cause()
46 assertEquals(42, ex.getErrorIndex()); in test_constructor_message_parsedData_errorIndex_cause()
47 assertSame(cause, ex.getCause()); in test_constructor_message_parsedData_errorIndex_cause()
/libcore/ojluni/src/main/java/java/lang/invoke/
DMethodHandleNatives.java513 static LinkageError mapLookupExceptionToError(ReflectiveOperationException ex) { in mapLookupExceptionToError() argument
515 if (ex instanceof IllegalAccessException) { in mapLookupExceptionToError()
516 Throwable cause = ex.getCause(); in mapLookupExceptionToError()
520 err = new IllegalAccessError(ex.getMessage()); in mapLookupExceptionToError()
522 } else if (ex instanceof NoSuchMethodException) { in mapLookupExceptionToError()
523 err = new NoSuchMethodError(ex.getMessage()); in mapLookupExceptionToError()
524 } else if (ex instanceof NoSuchFieldException) { in mapLookupExceptionToError()
525 err = new NoSuchFieldError(ex.getMessage()); in mapLookupExceptionToError()
529 return initCauseFrom(err, ex); in mapLookupExceptionToError()
536 static <E extends Error> E initCauseFrom(E err, Exception ex) { in initCauseFrom() argument
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DForkJoinTask.java236 final Throwable ex; // null if a waiter field in ForkJoinTask.Aux
238 Aux(Thread thread, Throwable ex) { in Aux() argument
240 this.ex = ex; in Aux()
291 for (Aux a; (a = aux) != null && a.ex == null; ) { in signalWaiters()
332 final int trySetThrown(Throwable ex) { in trySetThrown() argument
333 Aux h = new Aux(Thread.currentThread(), ex), p = null; in trySetThrown()
338 if (!installed && ((a = aux) == null || a.ex == null) && in trySetThrown()
354 int trySetException(Throwable ex) { in trySetException() argument
355 return trySetThrown(ex); in trySetException()
476 if ((a = aux) != null && a.ex != null) in awaitDone()
[all …]
/libcore/ojluni/src/test/java/lang/Math/
DExactArithTests.java109 } catch (ArithmeticException ex) { in testIntegerExact()
112 … fail("FAIL: int Math.addExact(" + x + " + " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
124 } catch (ArithmeticException ex) { in testIntegerExact()
127 … fail("FAIL: int Math.subtractExact(" + x + " - " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
138 } catch (ArithmeticException ex) { in testIntegerExact()
141 … fail("FAIL: int Math.multiplyExact(" + x + " * " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
177 } catch (ArithmeticException ex) { in testIntegerExact()
180 "; Unexpected exception: " + ex); in testIntegerExact()
211 } catch (ArithmeticException ex) { in testIntegerExact()
214 "; Unexpected exception: " + ex); in testIntegerExact()
[all …]
/libcore/ojluni/src/test/java/lang/StrictMath/
DExactArithTests.java82 } catch (ArithmeticException ex) { in testIntegerExact()
85 … fail("FAIL: int StrictMath.addExact(" + x + " + " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
97 } catch (ArithmeticException ex) { in testIntegerExact()
100 …ail("FAIL: int StrictMath.subtractExact(" + x + " - " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
111 } catch (ArithmeticException ex) { in testIntegerExact()
114 …ail("FAIL: int StrictMath.multiplyExact(" + x + " * " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
127 } catch (ArithmeticException ex) { in testIntegerExact()
130 … fail("FAIL: int StrictMath.incrementExact(" + x + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
143 } catch (ArithmeticException ex) { in testIntegerExact()
146 … fail("FAIL: int StrictMath.decrementExact(" + x + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
[all …]
/libcore/dom/src/test/java/org/w3c/domts/
DBatikTestDocumentBuilderFactory.java64 } catch (Exception ex) { in BatikTestDocumentBuilderFactory()
65 throw new DOMTestIncompatibleException(ex, null); in BatikTestDocumentBuilderFactory()
97 } catch (InvocationTargetException ex) { in BatikTestDocumentBuilderFactory()
99 ex.getTargetException(), in BatikTestDocumentBuilderFactory()
101 } catch (Exception ex) { in BatikTestDocumentBuilderFactory()
102 throw new DOMTestIncompatibleException(ex, null); in BatikTestDocumentBuilderFactory()
136 } catch (InvocationTargetException ex) { in load()
137 ex.printStackTrace(); in load()
138 throw new DOMTestLoadException(ex.getTargetException()); in load()
139 } catch (Exception ex) { in load()
[all …]
DDOM4JTestDocumentBuilderFactory.java85 catch (InvocationTargetException ex) { in DOM4JTestDocumentBuilderFactory()
86 throw new DOMTestIncompatibleException(ex.getTargetException(), null); in DOM4JTestDocumentBuilderFactory()
88 catch (Exception ex) { in DOM4JTestDocumentBuilderFactory()
89 throw new DOMTestIncompatibleException(ex, null); in DOM4JTestDocumentBuilderFactory()
116 catch (InvocationTargetException ex) { in load()
117 ex.getTargetException().printStackTrace(); in load()
118 throw new DOMTestLoadException(ex.getTargetException()); in load()
120 catch (Exception ex) { in load()
121 ex.printStackTrace(); in load()
122 throw new DOMTestLoadException(ex); in load()
DLSDocumentBuilderFactory.java144 catch (InvocationTargetException ex) { in setParameter()
145 throw new DOMTestIncompatibleException(ex.getTargetException(), setting); in setParameter()
147 catch (Exception ex) { in setParameter()
148 throw new DOMTestIncompatibleException(ex, setting); in setParameter()
188 catch (Exception ex) { in hasSetting()
232 catch (Exception ex) { in hasSetting()
288 catch (InvocationTargetException ex) { in LSDocumentBuilderFactory()
289 throw new DOMTestIncompatibleException(ex.getTargetException(), null); in LSDocumentBuilderFactory()
291 catch (Exception ex) { in LSDocumentBuilderFactory()
292 throw new DOMTestIncompatibleException(ex, null); in LSDocumentBuilderFactory()
[all …]
/libcore/luni/src/main/java/org/apache/harmony/xml/parsers/
DSAXParserFactoryImpl.java58 } catch (SAXNotRecognizedException ex) { in isNamespaceAware()
59 throw new AssertionError(ex); in isNamespaceAware()
67 } catch (SAXNotRecognizedException ex) { in isValidating()
68 throw new AssertionError(ex); in isValidating()
81 } catch (Exception ex) { in newSAXParser()
82 throw new ParserConfigurationException(ex.toString()); in newSAXParser()
108 } catch (SAXNotRecognizedException ex) { in setNamespaceAware()
109 throw new AssertionError(ex); in setNamespaceAware()
117 } catch (SAXNotRecognizedException ex) { in setValidating()
118 throw new AssertionError(ex); in setValidating()
/libcore/ojluni/src/test/java/time/test/java/time/format/
DTestNumberPrinter.java192 } catch (DateTimeException ex) { in test_pad_NOT_NEGATIVE()
194 assertEquals(ex.getMessage().contains(DAY_OF_MONTH.toString()), true); in test_pad_NOT_NEGATIVE()
196 throw ex; in test_pad_NOT_NEGATIVE()
209 } catch (DateTimeException ex) { in test_pad_NEVER()
211 throw ex; in test_pad_NEVER()
213 assertEquals(ex.getMessage().contains(DAY_OF_MONTH.toString()), true); in test_pad_NEVER()
225 } catch (DateTimeException ex) { in test_pad_NORMAL()
227 throw ex; in test_pad_NORMAL()
229 assertEquals(ex.getMessage().contains(DAY_OF_MONTH.toString()), true); in test_pad_NORMAL()
241 } catch (DateTimeException ex) {
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/reflect/
DFieldTest.java574 } catch (IllegalArgumentException ex) { in test_getBooleanLjava_lang_Object()
576 } catch (Exception ex) { in test_getBooleanLjava_lang_Object()
587 } catch (NullPointerException ex) { in test_getBooleanLjava_lang_Object()
589 } catch (Exception ex) { in test_getBooleanLjava_lang_Object()
600 } catch (Exception ex) { in test_getBooleanLjava_lang_Object()
628 } catch (IllegalArgumentException ex) { in test_getByteLjava_lang_Object()
630 } catch (Exception ex) { in test_getByteLjava_lang_Object()
641 } catch (NullPointerException ex) { in test_getByteLjava_lang_Object()
643 } catch (Exception ex) { in test_getByteLjava_lang_Object()
654 } catch (Exception ex) { in test_getByteLjava_lang_Object()
[all …]
/libcore/ojluni/src/main/java/java/util/logging/
DStreamHandler.java92 } catch (Exception ex) { in configure()
150 } catch (UnsupportedEncodingException ex) { in setOutputStream()
153 throw new Error("Unexpected exception " + ex); in setOutputStream()
212 } catch (Exception ex) { in publish()
215 reportError(null, ex, ErrorManager.FORMAT_FAILURE); in publish()
225 } catch (Exception ex) { in publish()
228 reportError(null, ex, ErrorManager.WRITE_FAILURE); in publish()
260 } catch (Exception ex) { in flush()
263 reportError(null, ex, ErrorManager.FLUSH_FAILURE); in flush()
279 } catch (Exception ex) { in flushAndClose()
[all …]
/libcore/luni/src/test/java/libcore/java/time/
DDateTimeExceptionTest.java32 DateTimeException ex = new DateTimeException("message"); in test_constructor_message() local
33 assertEquals("message", ex.getMessage()); in test_constructor_message()
34 assertNull(ex.getCause()); in test_constructor_message()
41 DateTimeException ex = new DateTimeException("message", cause); in test_constructor_message_cause() local
42 assertEquals("message", ex.getMessage()); in test_constructor_message_cause()
43 assertSame(cause, ex.getCause()); in test_constructor_message_cause()
/libcore/luni/src/test/java/libcore/java/time/temporal/
DUnsupportedTemporalTypeExceptionTest.java31 UnsupportedTemporalTypeException ex = new UnsupportedTemporalTypeException("message"); in test_constructor_message() local
32 assertEquals("message", ex.getMessage()); in test_constructor_message()
33 assertNull(ex.getCause()); in test_constructor_message()
39 UnsupportedTemporalTypeException ex = in test_constructor_message_cause() local
41 assertEquals("message", ex.getMessage()); in test_constructor_message_cause()
42 assertSame(cause, ex.getCause()); in test_constructor_message_cause()
/libcore/luni/src/test/java/libcore/java/time/zone/
DZoneRulesExceptionTest.java32 ZoneRulesException ex = new ZoneRulesException("message"); in test_constructor_message() local
33 assertEquals("message", ex.getMessage()); in test_constructor_message()
34 assertNull(ex.getCause()); in test_constructor_message()
40 ZoneRulesException ex = new ZoneRulesException("message", cause); in test_constructor_message_cause() local
41 assertEquals("message", ex.getMessage()); in test_constructor_message_cause()
42 assertSame(cause, ex.getCause()); in test_constructor_message_cause()
/libcore/luni/src/test/java/tests/org/w3c/dom/
DNodeSetPrefix.java135 } catch (DOMException ex) { in testSetPrefix3()
136 success = (ex.code == DOMException.NAMESPACE_ERR); in testSetPrefix3()
187 } catch (DOMException ex) { in testSetPrefix5()
188 success = (ex.code == DOMException.NAMESPACE_ERR); in testSetPrefix5()
205 } catch (DOMException ex) { in testSetPrefix6()
206 success = (ex.code == DOMException.NAMESPACE_ERR); in testSetPrefix6()
222 } catch (DOMException ex) { in testSetPrefix7()
223 success = (ex.code == DOMException.NAMESPACE_ERR); in testSetPrefix7()
242 } catch (DOMException ex) { in testSetPrefix8()
243 success = (ex.code == DOMException.NAMESPACE_ERR); in testSetPrefix8()
[all …]
/libcore/ojluni/src/main/java/javax/sql/
DConnectionEvent.java68 public ConnectionEvent(PooledConnection con, SQLException ex) { in ConnectionEvent() argument
70 this.ex = ex; in ConnectionEvent()
79 public SQLException getSQLException() { return ex; } in getSQLException()
87 private SQLException ex = null; field in ConnectionEvent
/libcore/ojluni/src/test/java/util/concurrent/tck/
DCompletableFutureTest.java197 Throwable ex) { in checkCompletedWithWrappedException() argument
198 checkCompletedExceptionally(f, true, t -> assertSame(t, ex)); in checkCompletedWithWrappedException()
201 void checkCompletedExceptionally(CompletableFuture<?> f, Throwable ex) { in checkCompletedExceptionally() argument
202 checkCompletedExceptionally(f, false, t -> assertSame(t, ex)); in checkCompletedExceptionally()
265 CFException ex = new CFException();
267 f.completeExceptionally(ex);
268 checkCompletedExceptionally(f, ex);
315 CFException ex;
321 f.obtrudeException(ex = new CFException());
322 checkCompletedExceptionally(f, ex);
[all …]

12345678910>>...24