aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Court`es2006-02-16 17:26:32 +0000
committerLudovic Court`es2006-02-16 17:26:32 +0000
commit01b7cf6d02d0bf7243012193c63e64407117bbfa (patch)
treeace4bdcf820b6ad67ce03eaa8dc3b708d36c1bd9
parentbb63cc24d8ea38bc645c38cb7c44edf33b220bee (diff)
downloadskribilo-01b7cf6d02d0bf7243012193c63e64407117bbfa.tar.gz
skribilo-01b7cf6d02d0bf7243012193c63e64407117bbfa.tar.lz
skribilo-01b7cf6d02d0bf7243012193c63e64407117bbfa.zip
`skribilo': do not catch all exceptions, let a stack trace be output intead.
* src/skribilo.in: Do not try to catch any exception. Thanks to Neil's `catch' patch, a backtrace now gets nicely printed. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-46
-rwxr-xr-xsrc/skribilo.in19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/skribilo.in b/src/skribilo.in
index 952784a..7d3a78d 100755
--- a/src/skribilo.in
+++ b/src/skribilo.in
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005,2006 Ludovic Courtès <ludovic.courtes@laas.fr>
+# Copyright 2005, 2006 Ludovic Courtès <ludovic.courtes@laas.fr>
#
#
# This program is free software; you can redistribute it and/or modify
@@ -20,15 +20,18 @@
# The `skribilo' executable.
+# Note: In Guile 1.8+ (or 1.9), when Guile is run in batch mode with
+# `--debug', it produces a clean stack trace when an exception is
+# raised and uncaught. On earlier versions, it behaves as if
+# `--debug' had not been passed, not displaying a stack trace. See
+# http://lists.gnu.org/archive/html/guile-devel/2006-01/msg00022.html
+# for details.
+
main='(module-ref (resolve-module '\''(skribilo)) '\'main')'
exec ${GUILE-@GUILE@} --debug \
-c "
(use-modules (skribilo condition))
-(catch #t (lambda ()
- (call-with-skribilo-error-catch
- (lambda ()
- (apply $main (cdr (command-line))))))
- (lambda (key . args)
- (format (current-error-port) \"exception \`~a' raised~%\" key)
- (exit 1)))" "$@"
+(call-with-skribilo-error-catch
+ (lambda ()
+ (apply $main (cdr (command-line)))))" "$@"