summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/pixbuf.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/chickadee/pixbuf.scm b/chickadee/pixbuf.scm
index 09db6ee..61af06f 100644
--- a/chickadee/pixbuf.scm
+++ b/chickadee/pixbuf.scm
@@ -24,6 +24,7 @@
(define-module (chickadee pixbuf)
#:use-module (chickadee graphics color)
#:use-module (chickadee utils)
+ #:use-module (ice-9 exceptions)
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-9 gnu)
@@ -40,8 +41,17 @@
pixbuf-flip-vertically!
pixbuf-color-key!))
+(define &pixbuf-error
+ (make-exception-type '&pixbuf-error &error '()))
+
+(define make-pixbuf-error (record-constructor &pixbuf-error))
+
(define (pixbuf-error message irritants)
- (error 'pixbuff-error message irritants))
+ (raise-exception
+ (make-exception
+ (make-pixbuf-error)
+ (make-exception-with-message message)
+ (make-exception-with-irritants irritants))))
;; A pixbuf is raw pixel data stored in memory that can be saved to
;; disk or loaded into a GPU texture.