Cross Reference: Neg04.java
xref
: /
openjdk7
/
langtools
/
test
/
tools
/
javac
/
multicatch
/
Neg04.java
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
549
N/A
/*
549
N/A
* @test /nodynamiccopyright/
549
N/A
* @bug 6943289
549
N/A
*
549
N/A
* @summary Project Coin: Improved Exception Handling for Java (aka 'multicatch')
549
N/A
* @author mcimadamore
549
N/A
* @
compile
/
fail
/
ref
=Neg04.out -XDrawDiagnostics
Neg04.java
549
N/A
*
549
N/A
*/
549
N/A
549
N/A
class
Neg04
{
549
N/A
static
class
A
extends
Exception
{}
549
N/A
static
class
B
extends
Exception
{}
549
N/A
549
N/A
void
test
()
throws
B {
549
N/A
try
{
549
N/A
if
(
true
) {
549
N/A
throw
new
A();
549
N/A
}
else
if
(
false
) {
549
N/A
throw
new
B();
549
N/A
}
else
{
549
N/A
throw
(
Throwable
)
new
Exception
();
549
N/A
}
549
N/A
}
549
N/A
catch
(A e) {}
549
N/A
catch
(
final
Exception
e) {
549
N/A
throw
e;
549
N/A
}
549
N/A
catch
(
Throwable
t) {}
549
N/A
}
549
N/A
}