summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2022-10-08 21:35:04 -0400
committerDavid Thompson <dthompson2@worcester.edu>2022-10-08 21:35:04 -0400
commit823e36c7d0e49540556a1a3fcb818fb60fb41dab (patch)
treea9bb85d6d45c87baa2e190c0b6b162917d190ea6
parent4731106e919a72399b6b00a8f08558bdb794e39b (diff)
play: Fix crash when exception stack frame is from an unknown file.
-rw-r--r--chickadee/cli/play.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/chickadee/cli/play.scm b/chickadee/cli/play.scm
index 4e18b31..7c3fed1 100644
--- a/chickadee/cli/play.scm
+++ b/chickadee/cli/play.scm
@@ -203,7 +203,11 @@ Resume the game loop without entering a debugger."
(format #f "~a: In procedure: ~a:~%In procedure: ~a: ~a~%"
(match (frame-source frame)
((_ file-name line . column)
- (format #f "~a:~a:~a" (basename file-name) line column))
+ (format #f "~a:~a:~a"
+ (if file-name
+ (basename file-name)
+ "unknown file")
+ line column))
(_ "unknown"))
(frame-procedure-name frame)
(if (exception-with-origin? e)