/[cl-neo4j]/conditions.lisp
ViewVC logotype

Contents of /conditions.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations)
Tue May 18 19:43:41 2010 UTC (3 years, 11 months ago) by kraison
File size: 1845 byte(s)
initial check in

1 (in-package #:cl-neo4j)
2
3 (define-condition unknown-return-type-error (error)
4 ((uri :accessor uri :initarg :uri)
5 (property :accessor property :initarg :property)
6 (status :accessor status :initarg :status))
7 (:report (lambda (condition stream)
8 (format stream "Unknown status ~A returned for ~A (~A)"
9 (status condition) (uri condition) (property condition)))))
10
11 (define-condition invalid-data-sent-error (error)
12 ((json :accessor json :initarg :json)
13 (uri :accessor uri :initarg :uri))
14 (:report (lambda (condition stream)
15 (format stream "Invalid data sent to ~A: ~A" (uri condition) (json condition)))))
16
17 (define-condition node-not-found-error (error)
18 ((uri :accessor uri :initarg :uri)
19 (property :accessor property :initarg :property))
20 (:report (lambda (condition stream)
21 (if (slot-boundp condition 'property)
22 (format stream "Property ~A not found for node ~A"
23 (property condition) (uri condition))
24 (format stream "Node not found ~A" (uri condition))))))
25
26 (define-condition unable-to-delete-node-error (error)
27 ((uri :accessor uri :initarg :uri))
28 (:report (lambda (condition stream)
29 (format stream "Unable to delete node ~A. Still has relationships?" (uri condition)))))
30
31 (define-condition relationship-not-found-error (error)
32 ((uri :accessor uri :initarg :uri)
33 (property :accessor property :initarg :property))
34 (:report (lambda (condition stream)
35 (if (slot-boundp condition 'property)
36 (format stream "Property ~A not found for relationship ~A"
37 (property condition) (uri condition))
38 (format stream "Relationship not found ~A" (uri condition))))))
39
40 (define-condition index-entry-not-found-error (error)
41 ((uri :accessor uri :initarg :uri))
42 (:report (lambda (condition stream)
43 (format stream "Index entry not found ~A" (uri condition)))))
44

  ViewVC Help
Powered by ViewVC 1.1.5