Some non-idiomatic way of doing try catch.