Browse Source

Add and export plugin-conf-error condition

PuercoPop 11 years ago
parent
commit
72f0000a82
3 changed files with 11 additions and 0 deletions
  1. 1 0
      coleslaw.asd
  2. 9 0
      src/conditions.lisp
  3. 1 0
      src/packages.lisp

+ 1 - 0
coleslaw.asd

17
   :serial t
17
   :serial t
18
   :components ((:file "packages")
18
   :components ((:file "packages")
19
                (:file "util")
19
                (:file "util")
20
+               (:file "conditions")
20
                (:file "config")
21
                (:file "config")
21
                (:file "themes")
22
                (:file "themes")
22
                (:file "documents")
23
                (:file "documents")

+ 9 - 0
src/conditions.lisp

1
+(in-package :coleslaw)
2
+
3
+(define-condition plugin-conf-error ()
4
+  ((plugin :initform "Plugin":initarg :plugin :reader plugin)
5
+   (message :initform "" :initarg :message :reader message))
6
+  (:report (lambda (condition stream)
7
+             (format stream "~A: ~A" (plugin condition) (message condition))))
8
+  (:documentation "Condition to signal when the plugin is misconfigured."))
9
+

+ 1 - 0
src/packages.lisp

17
            #:add-injection
17
            #:add-injection
18
            #:theme-fn
18
            #:theme-fn
19
            #:get-updated-files
19
            #:get-updated-files
20
+           #:plugin-conf-error
20
            ;; The Document Protocol
21
            ;; The Document Protocol
21
            #:add-document
22
            #:add-document
22
            #:find-all
23
            #:find-all