RdfException class

Base exception class for all RDF-related errors.

This serves as the root of the exception hierarchy for the RDF library, providing common functionality for all specific exceptions. It captures essential error information including error messages, causes, and source locations.

Specific exception types in the library extend this base class to provide more targeted error handling for different RDF operations (decoding, encoding, validation, etc.).

Example:

try {
  // RDF operation that might fail
} catch (e) {
  if (e is RdfException) {
    // Handle RDF-specific error with access to detailed information
    print(e.message);
    print(e.source);
  } else {
    // Handle other types of errors
  }
}
Implemented types
Implementers

Constructors

RdfException(String message, {Object? cause, SourceLocation? source})
Creates a new RDF exception
const

Properties

cause Object?
The original error that caused this exception, if any
final
hashCode int
The hash code for this object.
no setterinherited
message String
Human-readable error message describing the issue
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source SourceLocation?
Optional source information where the error occurred
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited