Swi-cs-pl - A CSharp class library to connect .NET languages with SWI-Prolog
PlDomainException Class
SwiPlCs interface ► SbsSW.SwiPlCs.Exceptions ► PlDomainException
A domain exception expresses that a term satisfies the basic Prolog type expected, but is unacceptable
to the restricted domain expected by some operation.
Declaration Syntax
C# | Visual Basic | Visual C++ | F# |
[SerializableAttribute] public class PlDomainException : PlException
<SerializableAttribute> Public Class PlDomainException Inherits PlException
[SerializableAttribute] public ref class PlDomainException : public PlException
[<SerializableAttribute>] type PlDomainException = class inherit PlException end
Members
All Members | Constructors | Methods | Properties | ||
|
|
|
Icon | Member | Description |
---|---|---|
PlDomainException()()()() |
This class is the base class to catch exceptions thrown by prolog in C#. |
|
PlDomainException(String) |
This class is the base class to catch exceptions thrown by prolog in C#. |
|
PlDomainException(String, Exception) |
This class is the base class to catch exceptions thrown by prolog in C#. |
|
PlDomainException(SerializationInfo, StreamingContext) |
This class is the base class to catch exceptions thrown by prolog in C#. |
|
PlDomainException(PlTerm) |
This class is the base class to catch exceptions thrown by prolog in C#. |
|
Data | Gets a collection of key/value pairs that provide additional user-defined information about the exception. (Inherited from Exception.) |
|
Equals(Object) | (Inherited from Object.) |
|
Finalize()()()() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
|
GetBaseException()()()() | When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions. (Inherited from Exception.) |
|
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetObjectData(SerializationInfo, StreamingContext) | When overridden in a derived class, sets the SerializationInfo with information about the exception. (Inherited from PlException.) |
|
GetType()()()() | Gets the runtime type of the current instance. (Inherited from Exception.) |
|
HelpLink | Gets or sets a link to the help file associated with this exception. (Inherited from Exception.) |
|
HResult | Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. (Inherited from Exception.) |
|
InnerException | Gets the Exception instance that caused the current exception. (Inherited from Exception.) |
|
MemberwiseClone()()()() | Creates a shallow copy of the current Object. (Inherited from Object.) |
|
Message | Gets a message that describes the current exception. (Inherited from PlException.) |
|
MessagePl | provide somtimes some additional information about the exceptions reason. (Inherited from PlException.) |
|
PlThrow()()()() |
Generate an exception (as throw/1) and return false.
(Inherited from PlException.) |
|
Source | Gets or sets the name of the application or the object that causes the error. (Inherited from Exception.) |
|
StackTrace | Gets a string representation of the frames on the call stack at the time the current exception was thrown. (Inherited from Exception.) |
|
TargetSite | Gets the method that throws the current exception. (Inherited from Exception.) |
|
Term |
Get the PlTerm of this exception.
(Inherited from PlException.) |
|
Throw()()()() |
Throw this PlException.
(Inherited from PlException.) |
|
ToString()()()() |
The exception is translated into a message as produced by print_message/2. The character data is stored in a ring.
(Inherited from PlException.) |
Examples
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.
Copy | |
---|---|
public void prolog_domain_exception_sample() { try { Assert.IsTrue(PlQuery.PlCall("open(temp_kill, nonsens, F)")); } catch (PlDomainException ex) { Assert.AreEqual("open/3: Domain error: `io_mode' expected, found `nonsens'", ex.Message); } } |
Inheritance Hierarchy
Object | |||
Exception | |||
PlException | |||
PlDomainException |
Assembly: SwiPlCs (Module: SwiPlCs.dll) Version: 1.1.60605.0 (1.1.60605.0)