HRCPP-61 JniTest cleanup after exception is thrown to avoid hanging; fai...

...l the build if an exception is thrown