1.10 Exceptions
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • A C++ interface to SWI-Prolog
        • A C++ interface to SWI-Prolog (Version 1)
          • Exceptions
            • The class PlException
            • The class PlTypeError
            • The class PlDomainError

1.10.3 The class 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 char *expected, const PlTerm &actual)
Creates an ISO standard Prolog error term expressing a the expected domain and the actual term found.