Throw an exception if terminfo is not found.