guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-128-g669ea


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.1-128-g669ea4e
Date: Fri, 17 Jun 2011 16:08:16 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=669ea4ebff8f0eb69b36f3d55b60e69f9f27c761

The branch, stable-2.0 has been updated
       via  669ea4ebff8f0eb69b36f3d55b60e69f9f27c761 (commit)
      from  0083cb5ec441c2a6df8d6eb1710eb8a88cf9fc5a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 669ea4ebff8f0eb69b36f3d55b60e69f9f27c761
Author: Andy Wingo <address@hidden>
Date:   Fri Jun 17 18:08:06 2011 +0200

    better messages on failed autocompilation
    
    * libguile/load.c (auto_compile_catch_handler):
    * module/ice-9/boot-9.scm (load-in-vicinity): Nicer messages when
      autocompilation fails.

-----------------------------------------------------------------------

Summary of changes:
 libguile/load.c         |   23 ++++++++++++++++++-----
 module/ice-9/boot-9.scm |   10 ++++++++--
 2 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/libguile/load.c b/libguile/load.c
index 8cc08e8..b06fd77 100644
--- a/libguile/load.c
+++ b/libguile/load.c
@@ -736,14 +736,27 @@ static SCM
 auto_compile_catch_handler (void *data, SCM tag, SCM throw_args)
 {
   SCM source = PTR2SCM (data);
+  SCM oport, lines;
+
+  oport = scm_open_output_string ();
+  scm_print_exception (oport, SCM_BOOL_F, tag, throw_args);
+
   scm_puts (";;; WARNING: compilation of ", scm_current_error_port ());
   scm_display (source, scm_current_error_port ());
   scm_puts (" failed:\n", scm_current_error_port ());
-  scm_puts (";;; key ", scm_current_error_port ());
-  scm_write (tag, scm_current_error_port ());
-  scm_puts (", throw args ", scm_current_error_port ());
-  scm_write (throw_args, scm_current_error_port ());
-  scm_newline (scm_current_error_port ());
+
+  lines = scm_string_split (scm_get_output_string (oport),
+                            SCM_MAKE_CHAR ('\n'));
+  for (; scm_is_pair (lines); lines = scm_cdr (lines))
+    if (scm_c_string_length (scm_car (lines)))
+      {
+        scm_puts (";;; ", scm_current_error_port ());
+        scm_display (scm_car (lines), scm_current_error_port ());
+        scm_newline (scm_current_error_port ());
+      }
+
+  scm_close_port (oport);
+
   return SCM_BOOL_F;
 }
 
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 1d14521..f31cffb 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -3506,8 +3506,14 @@ module '(ice-9 q) '(make-q q-length))}."
                  (else #f))))))
       (lambda (k . args)
         (format (current-error-port)
-                ";;; WARNING: compilation of ~a failed:\n;;; key ~a, 
throw_args ~s\n"
-                name k args)
+                ";;; WARNING: compilation of ~a failed:\n" name)
+        (for-each (lambda (s)
+                    (if (not (string-null? s))
+                        (format (current-error-port) ";;; ~a\n" s)))
+                  (string-split
+                   (call-with-output-string
+                    (lambda (port) (print-exception port #f k args)))
+                   #\newline))
         #f)))
 
   (define (absolute-path? path)


hooks/post-receive
-- 
GNU Guile



reply via email to

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