Explorar o código

Add and export plugin-conf-error condition

PuercoPop %!s(int64=11) %!d(string=hai) anos
pai
achega
72f0000a82
Modificáronse 3 ficheiros con 11 adicións e 0 borrados
  1. 1 0
      coleslaw.asd
  2. 9 0
      src/conditions.lisp
  3. 1 0
      src/packages.lisp

+ 1 - 0
coleslaw.asd

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

+ 9 - 0
src/conditions.lisp

@@ -0,0 +1,9 @@
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,6 +17,7 @@
17 17
            #:add-injection
18 18
            #:theme-fn
19 19
            #:get-updated-files
20
+           #:plugin-conf-error
20 21
            ;; The Document Protocol
21 22
            #:add-document
22 23
            #:find-all