Home
last modified time | relevance | path

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

12345678910>>...22

/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 …]
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 …]
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 …]
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/test/java/lang/Math/
DExactArithTests.java85 } catch (ArithmeticException ex) { in testIntegerExact()
88 … fail("FAIL: int Math.addExact(" + x + " + " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
101 } catch (ArithmeticException ex) { in testIntegerExact()
104 … fail("FAIL: int Math.subtractExact(" + x + " - " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
115 } catch (ArithmeticException ex) { in testIntegerExact()
118 … fail("FAIL: int Math.multiplyExact(" + x + " * " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
131 } catch (ArithmeticException ex) { in testIntegerExact()
134 fail("FAIL: int Math.incrementExact(" + x + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
148 } catch (ArithmeticException ex) { in testIntegerExact()
151 fail("FAIL: int Math.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/main/java/java/util/concurrent/
DForkJoinTask.java437 final Throwable ex; field in ForkJoinTask.ExceptionNode
441 ExceptionNode(ForkJoinTask<?> task, Throwable ex, ExceptionNode next, in ExceptionNode() argument
444 this.ex = ex; in ExceptionNode()
456 final int recordExceptionalCompletion(Throwable ex) { in recordExceptionalCompletion() argument
468 t[i] = new ExceptionNode(this, ex, t[i], in recordExceptionalCompletion()
488 private int setExceptionalCompletion(Throwable ex) { in setExceptionalCompletion() argument
489 int s = recordExceptionalCompletion(ex); in setExceptionalCompletion()
491 internalPropagateException(ex); in setExceptionalCompletion()
498 void internalPropagateException(Throwable ex) { in internalPropagateException() argument
575 Throwable ex; in getThrowableException() local
[all …]
/libcore/ojluni/src/main/java/java/lang/
DClassNotFoundException.java66 private Throwable ex; field in ClassNotFoundException
94 public ClassNotFoundException(String s, Throwable ex) { in ClassNotFoundException() argument
96 this.ex = ex; in ClassNotFoundException()
111 return ex; in getException()
123 return ex; in getCause()
/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/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/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/test/java/lang/StrictMath/
DExactArithTests.java109 } catch (ArithmeticException ex) { in testIntegerExact()
112 … fail("FAIL: int StrictMath.addExact(" + x + " + " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
125 } catch (ArithmeticException ex) { in testIntegerExact()
128 …ail("FAIL: int StrictMath.subtractExact(" + x + " - " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
139 } catch (ArithmeticException ex) { in testIntegerExact()
142 …ail("FAIL: int StrictMath.multiplyExact(" + x + " * " + y + ")" + "; Unexpected exception: " + ex); in testIntegerExact()
211 } catch (ArithmeticException ex) { in testLongExact()
213 … fail("FAIL: long StrictMath.addExact(" + x + " + " + y + "); Unexpected exception: " + ex); in testLongExact()
222 } catch (ArithmeticException ex) { in testLongExact()
224 …il("FAIL: long StrictMath.subtractExact(" + x + " - " + y + ")" + "; Unexpected exception: " + ex); in testLongExact()
[all …]
/libcore/ojluni/src/main/java/java/time/format/
DDateTimeFormatter.java1753 } catch (IOException ex) { in formatTo()
1754 throw new DateTimeException(ex.getMessage(), ex); in formatTo()
1778 } catch (DateTimeParseException ex) { in parse()
1779 throw ex; in parse()
1780 } catch (RuntimeException ex) { in parse()
1781 throw createError(text, ex); in parse()
1820 } catch (DateTimeParseException | IndexOutOfBoundsException ex) { in parse()
1821 throw ex; in parse()
1822 } catch (RuntimeException ex) { in parse()
1823 throw createError(text, ex); in parse()
[all …]

12345678910>>...22