nit: I would not recommend to use the hanging style. Lets move the ´else´ and ´catch´ statements into their own line.