include::../why.adoc[]

[source,java,diff-id=1,diff-type=noncompliant]
----
try {
  /* some work which end up throwing an exception */
  throw new IllegalArgumentException();
} finally {
  /* clean up */
  throw new RuntimeException();       // Noncompliant; masks the IllegalArgumentException
}
----

[source,java,diff-id=1,diff-type=compliant]
----
try {
  /* some work which end up throwing an exception */
  throw new IllegalArgumentException();
} finally {
  /* clean up */
}
----

== Resources

* https://wiki.sei.cmu.edu/confluence/x/FTZGBQ[CERT, ERR05-J.] - Do not let checked exceptions escape from a finally block

include::../rspecator.adoc[]