guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Emit a 1-based line number in error messages


From: Neil Jerram
Subject: [PATCH] Emit a 1-based line number in error messages
Date: Thu, 12 May 2011 23:17:05 +0100

* module/ice-9/boot-9.scm (exception-printers): Add 1 to the 0-based
  line number.
---
 module/ice-9/boot-9.scm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 60d133f..6130f85 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -682,7 +682,7 @@ If there is no handler at all, Guile prints an error and 
then exits."
           (let ((filename (or (cadr source) "<unnamed port>"))
                 (line (caddr source))
                 (col (cdddr source)))
-            (format port "~a:~a:~a: " filename line col))
+            (format port "~a:~a:~a: " filename (1+ line) col))
           (format port "ERROR: "))))
 
   (set! set-exception-printer!
-- 
1.7.4.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]