The usual way to write these is to have the UnitTest fail right after this line. That way, you won't need the boolean caught_expected and will keep your code a bit tighter.

(if it throws and exception, it'll jump over the FAIL. If the exception didn't happen, it'll fail)