diff options
author | Ludovic Courtes | 2006-07-23 20:49:40 +0000 |
---|---|---|
committer | Ludovic Courtes | 2006-07-23 20:49:40 +0000 |
commit | 6d7a8dbae57f06b883bab6e57728d07a9d072c22 (patch) | |
tree | aeb9ea3e003a4c046b4a9b9a898009b055c6c202 | |
parent | 9d8bd8dfbcd71464a17bf3e12546868a5c9e0580 (diff) | |
download | skribilo-6d7a8dbae57f06b883bab6e57728d07a9d072c22.tar.gz skribilo-6d7a8dbae57f06b883bab6e57728d07a9d072c22.tar.lz skribilo-6d7a8dbae57f06b883bab6e57728d07a9d072c22.zip |
Improved error reporting of the Skribilo module reader.
* src/guile/skribilo/utils/syntax.scm (%skribilo-module-reader): Improved
error reporting by showing the location of the unexpected character.
git-archimport-id: lcourtes@laas.fr--2005-libre/skribilo--devo--1.2--patch-23
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | src/guile/skribilo/utils/syntax.scm | 11 |
2 files changed, 23 insertions, 2 deletions
@@ -2,6 +2,20 @@ # arch-tag: automatic-ChangeLog--lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2 # +2006-07-23 20:36:51 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-62 + + Summary: + Improved error reporting of the Skribilo module reader. + Revision: + skribilo--devel--1.2--patch-62 + + * src/guile/skribilo/utils/syntax.scm (%skribilo-module-reader): Improved + error reporting by showing the location of the unexpected character. + + modified files: + ChangeLog src/guile/skribilo/utils/syntax.scm + + 2006-07-23 14:38:34 GMT Ludovic Courtes <ludovic.courtes@laas.fr> patch-61 Summary: diff --git a/src/guile/skribilo/utils/syntax.scm b/src/guile/skribilo/utils/syntax.scm index 975b879..06c89bd 100644 --- a/src/guile/skribilo/utils/syntax.scm +++ b/src/guile/skribilo/utils/syntax.scm @@ -42,8 +42,15 @@ '(colon-keywords no-scsh-block-comments srfi30-block-comments srfi62-sexp-comments) (lambda (chr port read) - (error "unexpected character in Skribilo module" - chr)) + (let ((file (port-filename port)) + (line (port-line port)) + (column (port-column port))) + (error (string-append + (if (string? file) + (format #f "~a:~a:~a: " file line column) + "") + "unexpected character in Skribilo module") + chr))) ;; By default, don't record positions: this yields a nice read ;; performance improvement. |