-
Notifications
You must be signed in to change notification settings - Fork 6
/
conditions.lisp
30 lines (25 loc) · 1 KB
/
conditions.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
(in-package #:vivace-graph-v2)
(define-condition prolog-error (error)
((reason :initarg :reason))
(:report (lambda (error stream)
(with-slots (reason) error
(format stream "Prolog error: ~A." reason)))))
(define-condition serialization-error (error)
((instance :initarg :instance)
(reason :initarg :reason))
(:report (lambda (error stream)
(with-slots (instance reason) error
(format stream "Serialization failed for ~a because of ~a."
instance reason)))))
(define-condition deserialization-error (error)
((instance :initarg :instance)
(reason :initarg :reason))
(:report (lambda (error stream)
(with-slots (instance reason) error
(format stream "Deserialization failed for ~a because of ~a."
instance reason)))))
(define-condition transaction-error (error)
((reason :initarg :reason))
(:report (lambda (error stream)
(with-slots (reason) error
(format stream "Transaction error: ~A." reason)))))