Added test for try-catch in loop #369