Catching unexpected exception