Change one exception from type RuntimeException back to Exception to catch all exceptions.