Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions exception.go → error.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,24 @@ func (e *ResourceError) Error() string {
return fmt.Sprintf("insufficient resource: %s", e.Resource)
}

// RepresentationError is an error that signifies one of the implementation limits exceeded.
type RepresentationError struct {
flag string
}

func (e *RepresentationError) Error() string {
return fmt.Sprintf("implementation limit exceeded: %s", e.flag)
}

// SyntaxError is an error that signifies a syntax error.
type SyntaxError struct {
impDepAtom string
}

func (e *SyntaxError) Error() string {
return fmt.Sprintf("syntax error: %s", e.impDepAtom)
}

// TypeError is an error that signifies an incorrect type.
type TypeError struct {
ValidType string
Expand All @@ -29,6 +47,16 @@ func (e *TypeError) Error() string {
return fmt.Sprintf("invalid type: expected %s, got %s", e.ValidType, e.Culprit)
}

// DomainError is an error that signifies an incorrect value.
type DomainError struct {
ValidDomain string
Culprit Term
}

func (e *DomainError) Error() string {
return fmt.Sprintf("invalid domain: expected %s, got %s", e.ValidDomain, e.Culprit)
}

// UninstantiationError is an error that signifies a term is non-variable.
type UninstantiationError struct {
Culprit Term
Expand Down
File renamed without changes.
Loading