[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Format in ,disassemble
From: |
Andrew Horton |
Subject: |
Format in ,disassemble |
Date: |
Sat, 19 Mar 2011 12:54:24 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
I've been following the development of Guile for years, and firstly
congratulations on Guile 2.0. It really is a masterpiece.
Amongst other things, I quite enjoy using ",disassemble" to see what the
VM generation is doing, but maybe I shouldn't go on too much about my
hobbies. Anyhow, I noticed a place where error is used without format,
resulting in a garbled error message:
scheme@(guile-user)> (define x 1)
scheme@(guile-user)> ,disassemble x
Disassembly of 1:
While executing meta-command:
ERROR: can't decompile ~A: not a program or objcode 1
Here's a tiny patch to add the format to the error statement.
From: Andrew Horton <address@hidden>
Date: Sat, 19 Mar 2011 12:11:18 +0000
Subject: [PATCH] Use format in the error string for decompile-value.
---
module/language/objcode/spec.scm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/module/language/objcode/spec.scm
b/module/language/objcode/spec.scm
index bbd7454..349be0d 100644
--- a/module/language/objcode/spec.scm
+++ b/module/language/objcode/spec.scm
@@ -71,7 +71,7 @@
((objcode? x)
(values x #f))
(else
- (error "can't decompile ~A: not a program or objcode" x))))
+ (error (format #f "can't decompile ~A: not a program or objcode"
x)))))
(define-language objcode
#:title "Guile Object Code"
--
1.7.4.1.227.gadfe4
- Format in ,disassemble,
Andrew Horton <=