Print direction in exception raised when it is invalid