summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/image.scm18
1 files changed, 12 insertions, 6 deletions
diff --git a/chickadee/image.scm b/chickadee/image.scm
index c5ec5dc..289fb14 100644
--- a/chickadee/image.scm
+++ b/chickadee/image.scm
@@ -39,6 +39,18 @@
read-image
write-image))
+(define &image-error
+ (make-exception-type '&image-error &error '()))
+
+(define make-image-error (record-constructor &image-error))
+
+(define (image-error message irritants)
+ (raise-exception
+ (make-exception
+ (make-image-error)
+ (make-exception-with-message message)
+ (make-exception-with-irritants irritants))))
+
;; An image is pixel data that is stored on disk in one of a variety
;; of formats.
(define-record-type <image>
@@ -62,12 +74,6 @@
("png" 'png)
(_ 'unknown)))
-(define (image-error message irritants)
- (raise-exception
- (make-exception
- (make-exception-with-message message)
- (make-exception-with-irritants irritants))))
-
(define* (read-image image)
"Read data from IMAGE and return a pixbuf."
(define-values (pixels width height)