A.16 library(error): Error generating support
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(error): Error generating support
          • type_error/2
          • domain_error/2
          • existence_error/2
          • existence_error/3
          • permission_error/3
          • instantiation_error/1
          • uninstantiation_error/1
          • representation_error/1
          • syntax_error/1
          • resource_error/1
          • must_be/2
          • is_of_type/2
          • has_type/2
          • current_encoding/1
          • current_type/3
    • Packages
Availability::- use_module(library(error)).(can be autoloaded)
Sourcesyntax_error(+Culprit)
A text has invalid syntax. The error is described by Culprit. According to the ISO Standard, Culprit should be an implementation-dependent atom.
To be done
Deal with proper description of the location of the error. For short texts, we allow for Type(Text), meaning Text is not a valid Type. E.g. syntax_error(number('1a')) means that 1a is not a valid number.