Formalize errors and error handling
[candle] / src / main / base.lisp
index e47c0fb8858318e145c107b349f0253fc9eff3bf..871da36596bc4939a5cf924cb1c5df7b839defba 100644 (file)
@@ -2,6 +2,9 @@
 
 (defvar *candle-dir*)
 
+(define-condition candle-error (error) ((reason :initarg :reason :reader candle-error-reason)))
+(defun raise-candle-error (reason) (error (make-instance 'candle-error :reason reason)))
+
 (lame-db:defdbstruct project name src)
 
 ; Status here is:
@@ -10,7 +13,7 @@
 ; - :succeeded - job succeeded
 ; - :no-candle-file - no candle file was found
 ; - :in-progress - job is running
-(lame-db:defdbstruct job status sha when-run (project :join project))
+(lame-db:defdbstruct job status sha create-date log (project :join project))
 
 ; in-git here refers to whether the branch exists in git.  As branches get deleted,
 ; this will get set to nil but we keep them around for historical reference