Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog
SbsSW.SwiPlCs.Exceptions Namespace
SwiPlCs interfaceSbsSW.SwiPlCs.Exceptions

These are the namespace comments for SbsSW.SwiPlCs.Exceptions.

The namespace SbsSW.SwiPlCs.Exceptions provides the Exception classes to catch a prolog exception see SWI-Prolog Manual - 4.9 ISO compliant Exception handling

Prolog exceptions are mapped to C# exceptions using the subclass PlException of Exception to represent the Prolog exception term.

All type-conversion functions of the interface raise Prolog-compliant exceptions, providing decent error-handling support at no extra work for the programmer.

For some commonly used exceptions, subclasses of PlException have been created to exploit both their constructors for easy creation of these exceptions as well as selective trapping in C#.

Currently, these are PlTypeException and PlDomainException.

Types
All TypesClasses
IconTypeDescription
PlException

This class is the base class to catch exceptions thrown by prolog in C#.


PlLibException
This exception is thrown if something in the interface went wrong.

PlTypeException
A type error expresses that a term does not satisfy the expected basic Prolog type.

Remarks