1.15.1 The class PlException
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • A C++ interface to SWI-Prolog
        • A C++ interface to SWI-Prolog
          • Exceptions
            • The class PlException
              • PlException class hierarchy
              • The function PlTypeError
              • The function PlDomainError

1.15.1.3 The function PlDomainError

A domain error expresses that a term satisfies the basic Prolog type expected, but is unacceptable to the restricted domain expected by some operation. For example, the standard Prolog open/3 call expect an io_mode (read, write, append, ...). If an integer is provided, this is a type error, if an atom other than one of the defined io-modes is provided it is a domain error.

PlDomainError :: PlDomainError(const std::string& expected, const PlTerm &actual)
Creates an ISO standard Prolog error term expressing a the expected domain and the actual term found.