Adding an exception handler because looking at the console log is too painful