From 79efe6daa8345df2702ce9f71be577a595ae660d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sun, 24 Apr 2022 19:49:30 +0200 Subject: Add fallback find-attr which gives a meaningful error message --- guile/starlet/fixture.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'guile/starlet/fixture.scm') 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 ( 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 ) (attr )) (let ((attr-obj (find-attr fix attr))) (if attr-obj -- cgit v1.2.3