aboutsummaryrefslogtreecommitdiff
path: root/guile
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-04-24 19:49:30 +0200
committerThomas White <taw@physics.org>2022-04-24 19:49:30 +0200
commit79efe6daa8345df2702ce9f71be577a595ae660d (patch)
tree271590099e36f1eeb04081b4e65744e78b8d99cb /guile
parentce607588e8ccf2257fc7f1863f967e52a565ce7a (diff)
Add fallback find-attr which gives a meaningful error message
Diffstat (limited to 'guile')
-rw-r--r--guile/starlet/fixture.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guile/starlet/fixture.scm b/guile/starlet/fixture.scm
index 1cda58d..5ef3492 100644
--- a/guile/starlet/fixture.scm
+++ b/guile/starlet/fixture.scm
@@ -21,6 +21,7 @@
(define-module (starlet fixture)
#:use-module (starlet colours)
#:use-module (oop goops)
+ #:use-module (ice-9 exceptions)
#:use-module (srfi srfi-1)
#:export (<fixture>
get-fixture-name
@@ -153,6 +154,13 @@
(find-attr fix 'colour))
+(define-method (find-attr fix attr-name)
+ (raise-exception
+ (make-exception
+ (make-exception-with-message "Invalid parameters")
+ (make-exception-with-irritants fix))))
+
+
(define-method (get-attr-home-val (fix <fixture>) (attr <symbol>))
(let ((attr-obj (find-attr fix attr)))
(if attr-obj