Sign in
apache
/
groovy
/
67cce94e9c08bbf3a4f7611aec65e50c8e8d014b
/
.
/
groovy
/
src
/
test
/
groovy
/
ThrowTest.groovy
blob: c371c7367ace0d2c6e0ccd697d92af14e38733b7 [
file
] [
log
] [
blame
]
package
groovy
class
ThrowTest
extends
GroovyTestCase
{
void
testThrow
()
{
try
{
throw
new
Exception
(
"abcd"
)
fail
(
"Should have thrown an exception by now"
)
}
catch
(
Exception
e
)
{
assert
e
.
message
==
"abcd"
println
(
"Caught exception ${e}"
)
}
}
}