Package de.japkit.test.members.method
Class MethodTemplate.rethrowAsRuntimeException
java.lang.Object
de.japkit.test.members.method.MethodTemplate.rethrowAsRuntimeException
- Enclosing class:
- MethodTemplate
@CodeFragment
class MethodTemplate.rethrowAsRuntimeException
extends java.lang.Object
A code fragment that that catches every Exception and rethrows it is
RuntimeException. To be used as surrounding fragment in
Method.bodySurroundingFragments(),
Constructor.bodySurroundingFragments() or
CodeFragment.surroundingFragments(). The code to be surrounded is
provided as EL variable 'surrounded' to the fragment.
- japkit.code
try { #{surrounded} } catch (Exception e) { throw new RuntimeException(e); }
-
Constructor Summary
Constructors Constructor Description rethrowAsRuntimeException() -
Method Summary
-
Constructor Details
-
rethrowAsRuntimeException
rethrowAsRuntimeException()
-