Home
last modified time | relevance | path

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

12345678910>>...17

/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 …]
DCharacterCodingExceptionTest.java32 CharacterCodingException ex = new CharacterCodingException(); in testConstructor() local
33 assertTrue(ex instanceof IOException); in testConstructor()
34 assertNull(ex.getCause()); in testConstructor()
35 assertNull(ex.getMessage()); in testConstructor()
/libcore/luni/src/test/java/libcore/java/lang/
DOldAndroidMonitorTest.java39 } catch (InterruptedException ex) { in testWaitArgumentsTest()
41 ex); in testWaitArgumentsTest()
42 } catch (Exception ex) { in testWaitArgumentsTest()
44 "Object.wait() with good arguments", ex); in testWaitArgumentsTest()
54 } catch (InterruptedException ex) { in testWaitArgumentsTest()
55 throw new RuntimeException("bad Object.wait() interrupted", ex); in testWaitArgumentsTest()
56 } catch (IllegalArgumentException ex) { in testWaitArgumentsTest()
58 } catch (Exception ex) { in testWaitArgumentsTest()
60 "Object.wait() with bad arguments", ex); in testWaitArgumentsTest()
72 } catch (InterruptedException ex) { in testWaitArgumentsTest()
[all …]
DClassCastExceptionTest.java31 } catch (ClassCastException ex) { in testClassCast()
32 assertEquals("java.lang.Exception cannot be cast 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/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/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 …]
DJUnitTestSuiteAdapter.java43 } catch(InvocationTargetException ex) { in addTest()
44 throw ex.getTargetException(); in addTest()
58 catch(Throwable ex) { in addTest()
59 if(!(ex instanceof DOMTestIncompatibleException)) { in addTest()
60 ex.printStackTrace(); in addTest()
DJAXPDOMTestDocumentBuilderFactory.java63 catch (ParserConfigurationException ex) { in JAXPDOMTestDocumentBuilderFactory()
64 throw new DOMTestIncompatibleException(ex, null); in JAXPDOMTestDocumentBuilderFactory()
96 public void error(SAXParseException ex) { in error() argument
99 parseException = ex; in error()
103 public void warning(SAXParseException ex) { in warning() argument
107 public void fatalError(SAXParseException ex) { in fatalError() argument
109 parseException = ex; in fatalError()
129 catch (Exception ex) { in load()
130 parseException = ex; in load()
/libcore/luni/src/main/java/java/util/concurrent/
DForkJoinTask.java407 final Throwable ex; field in ForkJoinTask.ExceptionNode
410 ExceptionNode(ForkJoinTask<?> task, Throwable ex, ExceptionNode next) { in ExceptionNode() argument
412 this.ex = ex; in ExceptionNode()
423 final int recordExceptionalCompletion(Throwable ex) { in recordExceptionalCompletion() argument
435 t[i] = new ExceptionNode(this, ex, t[i]); in recordExceptionalCompletion()
454 private int setExceptionalCompletion(Throwable ex) { in setExceptionalCompletion() argument
455 int s = recordExceptionalCompletion(ex); in setExceptionalCompletion()
457 internalPropagateException(ex); in setExceptionalCompletion()
464 void internalPropagateException(Throwable ex) { in internalPropagateException() argument
543 Throwable ex; in getThrowableException() local
[all …]
DForkJoinWorkerThread.java109 } catch (Throwable ex) { in run()
110 exception = ex; in run()
114 } catch (Throwable ex) { in run()
116 exception = ex; in run()
/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/luni/src/test/java/libcore/java/util/jar/
DOldJarExceptionTest.java28 JarException ex = new JarException(); in test_Constructor() local
31 assertNotSame(ex, ex1); in test_Constructor()
32 assertNotSame(ex.getMessage(), ex1.getMessage()); in test_Constructor()
33 assertNotSame(ex, ex2); in test_Constructor()
34 assertSame(ex.getMessage(), ex2.getMessage()); in test_Constructor()
/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 …]
DPrefix.java137 } catch (DOMException ex) { in testGetPrefix5()
138 success = (ex.code == DOMException.NAMESPACE_ERR); in testGetPrefix5()
155 } catch (DOMException ex) { in _testGetPrefix6()
156 success = (ex.code == DOMException.INVALID_CHARACTER_ERR); in _testGetPrefix6()
173 } catch (DOMException ex) { in testGetPrefix7()
174 success = (ex.code == DOMException.NAMESPACE_ERR); in testGetPrefix7()
227 } catch (DOMException ex) { in _testGetPrefix9()
228 success = (ex.code == DOMException.NAMESPACE_ERR); in _testGetPrefix9()
245 } catch (DOMException ex) { in testGetPrefix10()
246 success = (ex.code == DOMException.NAMESPACE_ERR); in testGetPrefix10()
[all …]
DCreateAttributeNS.java73 } catch (DOMException ex) { in testCreateAttributeNS1()
74 success = (ex.code == DOMException.NAMESPACE_ERR); in testCreateAttributeNS1()
91 } catch (DOMException ex) { in testCreateAttributeNS2()
92 success = (ex.code == DOMException.NAMESPACE_ERR); in testCreateAttributeNS2()
138 } catch (DOMException ex) { in testCreateAttributeNS3()
139 success = (ex.code == DOMException.INVALID_CHARACTER_ERR); in testCreateAttributeNS3()
156 } catch (DOMException ex) { in testCreateAttributeNS4()
157 success = (ex.code == DOMException.NAMESPACE_ERR); in testCreateAttributeNS4()
184 } catch (DOMException ex) { in testCreateAttributeNS6()
DCreateElementNS.java91 } catch (DOMException ex) { in testCreateElementNS1()
92 success = (ex.code == DOMException.NAMESPACE_ERR); in testCreateElementNS1()
109 } catch (DOMException ex) { in testCreateElementNS2()
110 success = (ex.code == DOMException.NAMESPACE_ERR); in testCreateElementNS2()
157 } catch (DOMException ex) { in testCreateElementNS3()
158 success = (ex.code == DOMException.INVALID_CHARACTER_ERR); in testCreateElementNS3()
175 } catch (DOMException ex) { in testCreateElementNS4()
176 success = (ex.code == DOMException.NAMESPACE_ERR); in testCreateElementNS4()
205 } catch (DOMException ex) { in testCreateElementNS6()
/libcore/luni/src/main/java/java/lang/
DClassNotFoundException.java27 private Throwable ex; field in ClassNotFoundException
60 ex = exception; in ClassNotFoundException()
69 return ex; in getException()
80 return ex; in getCause()
/libcore/dom/src/test/java/org/w3c/domts/level2/core/
Dnamednodemapremovenameditemns05.java90 } catch (DOMException ex) { in runTest()
91 switch (ex.code) { in runTest()
97 throw ex; in runTest()
105 } catch (DOMException ex) { in runTest()
106 switch (ex.code) { in runTest()
112 throw ex; in runTest()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DFileChannelLockingTest.java91 } catch (NonWritableChannelException ex) { in test_illegalLocks()
99 } catch (NonReadableChannelException ex) { in test_illegalLocks()
117 } catch (IllegalArgumentException ex) { in test_illegalLockParameters()
123 } catch (IllegalArgumentException ex) { in test_illegalLockParameters()
129 } catch (IllegalArgumentException ex) { in test_illegalLockParameters()
161 } catch (NonWritableChannelException ex) { in test_tryLock()
171 } catch (NonWritableChannelException ex) { in test_tryLockLLZ()
179 } catch (IllegalArgumentException ex) { in test_tryLockLLZ()
196 } catch (OverlappingFileLockException ex) { in test_tryLockLLZ()

12345678910>>...17