Keep plugin-conf-error condition with near the plugin handling code.
This commit is contained in:
parent
b2ffed2b17
commit
57f9aeb696
3 changed files with 8 additions and 11 deletions
|
@ -75,7 +75,6 @@ coleslaw:post and returns the tweet content.")
|
||||||
|
|
||||||
;; fallback to chirp for credential erros
|
;; fallback to chirp for credential erros
|
||||||
(chirp:account/verify-credentials)
|
(chirp:account/verify-credentials)
|
||||||
|
|
||||||
(when tweet-format
|
(when tweet-format
|
||||||
(setf *tweet-format* tweet-format)))
|
(setf *tweet-format* tweet-format)))
|
||||||
|
|
||||||
|
@ -87,7 +86,7 @@ coleslaw:post and returns the tweet content.")
|
||||||
:do (tweet-new-post file)))
|
:do (tweet-new-post file)))
|
||||||
|
|
||||||
(defun tweet-new-post (file)
|
(defun tweet-new-post (file)
|
||||||
"Retrieve most recent post from in memory DB and publish it."
|
"Retrieve content matching FILE from in memory DB and publish it."
|
||||||
(let ((post (coleslaw::find-content-by-path file)))
|
(let ((post (coleslaw::find-content-by-path file)))
|
||||||
(chirp:statuses/update (%format-post 0 post))))
|
(chirp:statuses/update (%format-post 0 post))))
|
||||||
|
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
(in-package :coleslaw)
|
|
||||||
|
|
||||||
(define-condition plugin-conf-error ()
|
|
||||||
((plugin :initform "Plugin":initarg :plugin :reader plugin)
|
|
||||||
(message :initform "" :initarg :message :reader message))
|
|
||||||
(:report (lambda (condition stream)
|
|
||||||
(format stream "~A: ~A" (plugin condition) (message condition))))
|
|
||||||
(:documentation "Condition to signal when the plugin is misconfigured."))
|
|
||||||
|
|
|
@ -19,6 +19,13 @@
|
||||||
(defparameter *config* nil
|
(defparameter *config* nil
|
||||||
"A variable to store the blog configuration and plugin settings.")
|
"A variable to store the blog configuration and plugin settings.")
|
||||||
|
|
||||||
|
(define-condition plugin-conf-error ()
|
||||||
|
((plugin :initarg :plugin :reader plugin)
|
||||||
|
(message :initarg :message :reader message))
|
||||||
|
(:report (lambda (condition stream)
|
||||||
|
(format stream "~A: ~A" (plugin condition) (message condition))))
|
||||||
|
(:documentation "Condition to signal when the plugin is misconfigured."))
|
||||||
|
|
||||||
(defun enable-plugin (name args)
|
(defun enable-plugin (name args)
|
||||||
"Given a plugin, NAME, compile+load it and call its ENABLE function with ARGS."
|
"Given a plugin, NAME, compile+load it and call its ENABLE function with ARGS."
|
||||||
(flet ((plugin-path (sym)
|
(flet ((plugin-path (sym)
|
||||||
|
|
Loading…
Add table
Reference in a new issue