unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] Emit a 1-based line number in error messages
@ 2011-05-12 22:17 Neil Jerram
  0 siblings, 0 replies; only message in thread
From: Neil Jerram @ 2011-05-12 22:17 UTC (permalink / raw)
  To: guile-devel; +Cc: Neil Jerram

* 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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-12 22:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-12 22:17 [PATCH] Emit a 1-based line number in error messages Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).