Skip to content

Commit 968f40f

Browse files
Fix 1 occurrence of always-throwing-if-to-when
Using `when` and `unless` is simpler than a conditional with an always-throwing branch.
1 parent 0c11253 commit 968f40f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scribble-lib/scriblib/gui-eval.rkt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@
101101
(λ (gui-eval get-predicate? get-render get-get-width get-get-height)
102102
(lambda (ev catching-exns? expr)
103103
(with-handlers ([exn:fail? (lambda (exn)
104-
(if catching-exns?
105-
(raise exn)
106-
(void)))])
104+
(when catching-exns?
105+
(raise exn))
106+
(void))])
107107
(define v (read log-file))
108108
(if (eof-object? v)
109109
(error "expression not in log file")

0 commit comments

Comments
 (0)