[MAT-407] Add missing JavaTerminal exception checks