changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/lib/organ/err.lisp

changeset 698: 96958d3eb5b0
parent: d5ee1f5f3cf4
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 (in-package :organ)
2 
3 (define-condition organ-error (error)
4  ((message :initarg :message
5  :reader organ-error-message))
6  (:documentation "Error signaled by the ORGAN system"))
7 
8 (defmethod print-object ((obj organ-error) stream)
9  (print-unreadable-object (obj stream :type t :identity t)
10  (format stream "~a" (organ-error-message obj))))
11 
12 (define-condition org-file-error (organ-error)
13  ((path :initarg :path
14  :reader organ-error-path))
15  (:documentation "Error signaled from a missing org file path."))
16 
17 (defun org-file-missing (path)
18  (error 'org-file-error :message "Org file does not exist"
19  :path path))
20 
21 (define-condition org-parse-error (parse-error organ-error) ())
22 
23 (define-condition org-write-error (stream-error organ-error) ())