unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* [bug #32243] guile-tools errors if PROGRAM can't be found
@ 2011-01-25 13:25 Mike Gran
  2011-01-27 10:25 ` Andy Wingo
  2011-02-02 19:36 ` Andy Wingo
  0 siblings, 2 replies; 6+ messages in thread
From: Mike Gran @ 2011-01-25 13:25 UTC (permalink / raw)
  To: Mike Gran, bug-guile


URL:
  <http://savannah.gnu.org/bugs/?32243>

                 Summary: guile-tools errors if PROGRAM can't be found
                 Project: Guile
            Submitted by: mike121
            Submitted on: Tue 25 Jan 2011 01:25:50 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

If I call guile-tools on a program that can't be found, like so

$ guile-tools zzyzx

it doesn't fail gracefully by telling me that the program zzyzx doesn't
exist.  It instead dumps a backtrace.

[mike@joseph src]$ guile-tools zzyzx
Backtrace:
In module/ice-9/boot-9.scm:
 170: 8 [catch #t #<catch-closure ab55a0> ...]
In unknown file:
   ?: 7 [catch-closure]
In module/ice-9/boot-9.scm:
  62: 6 [call-with-prompt prompt0 ...]
In module/ice-9/eval.scm:
 389: 5 [eval # #]
In /usr/local/bin/guile-tools:
 136: 4 [main ("/usr/local/bin/guile-tools" "zzyzx")]
In module/ice-9/boot-9.scm:
1899: 3 [module-ref {#f} main]
In unknown file:
   ?: 2 [module-variable {#f} main]
In module/ice-9/boot-9.scm:
 115: 1 [#<procedure a70910 at module/ice-9/boot-9.scm:110:6 (thrown-k .
args)> wrong-type-arg ...]
In unknown file:
   ?: 0 [catch-closure wrong-type-arg "module-variable" ...]

ERROR: In procedure module-variable:
ERROR: Wrong type argument in position 1 (expecting module): #f





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32243>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug #32243] guile-tools errors if PROGRAM can't be found
  2011-01-25 13:25 [bug #32243] guile-tools errors if PROGRAM can't be found Mike Gran
@ 2011-01-27 10:25 ` Andy Wingo
  2011-02-02 19:36 ` Andy Wingo
  1 sibling, 0 replies; 6+ messages in thread
From: Andy Wingo @ 2011-01-27 10:25 UTC (permalink / raw)
  To: Mike Gran; +Cc: bug-guile

On Tue 25 Jan 2011 14:25, Mike Gran <INVALID.NOREPLY@gnu.org> writes:

> If I call guile-tools on a program that can't be found, like so
>
> $ guile-tools zzyzx
>
> it doesn't fail gracefully by telling me that the program zzyzx doesn't
> exist.

Fixed in git, thanks.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug #32243] guile-tools errors if PROGRAM can't be found
  2011-01-25 13:25 [bug #32243] guile-tools errors if PROGRAM can't be found Mike Gran
  2011-01-27 10:25 ` Andy Wingo
@ 2011-02-02 19:36 ` Andy Wingo
  2011-02-03 21:21   ` Mark Harig
  2011-02-03 22:25   ` Mark Harig
  1 sibling, 2 replies; 6+ messages in thread
From: Andy Wingo @ 2011-02-02 19:36 UTC (permalink / raw)
  To: Andy Wingo, Mike Gran, bug-guile


Update of bug #32243 (project guile):

                  Status:                    None => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

Fixed in git; thanks for the reminder.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32243>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug #32243] guile-tools errors if PROGRAM can't be found
  2011-02-02 19:36 ` Andy Wingo
@ 2011-02-03 21:21   ` Mark Harig
  2011-02-10 11:19     ` Andy Wingo
  2011-02-03 22:25   ` Mark Harig
  1 sibling, 1 reply; 6+ messages in thread
From: Mark Harig @ 2011-02-03 21:21 UTC (permalink / raw)
  To: bug-guile; +Cc: spk121

> Follow-up Comment #1:                                                 

>                                                                       

> Fixed in git; thanks for the reminder.

Are the problems described below repaired by the latest fix, also?

[~]$ guile-tools -v
guile-tools (GNU Guile 1.9.15) 2.0
Copyright (C) 2010 Free Software Foundation, Inc.
License LGPLv3+: GNU LGPL version 3 or later 
<http://gnu.org/licenses/lgpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


[~]$ guile-tools doc-snarf -l
Backtrace:
In ice-9/boot-9.scm:
 170: 9 [catch #t #<catch-closure 11d40a0> ...]
In unknown file:
   ?: 8 [catch-closure]
In ice-9/boot-9.scm:
  62: 7 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 389: 6 [eval # #]
In /usr/local/bin/guile-tools:
 189: 5 [main ("/usr/local/bin/guile-tools" "doc-snarf" "-l")]
In scripts/doc-snarf.scm:
  99: 4 [doc-snarf "-l"]
In ice-9/getopt-long.scm:
  387: 3 [getopt-long ("doc-snarf" "-l") ((version # #) (help # #) 
(output # #) ...)]
In unknown file:
   ?: 2 [scm-error misc-error #f ...]
In ice-9/boot-9.scm:
  115: 1 [#<procedure 1191910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> misc-error ...]
In unknown file:
   ?: 0 [catch-closure misc-error #f ...]

[~]$ guile-tools doc-snarf -v
doc-snarf Backtrace:
In ice-9/boot-9.scm:
 170: 7 [catch #t #<catch-closure 10e50a0> ...]
In unknown file:
   ?: 6 [catch-closure]
In ice-9/boot-9.scm:
  62: 5 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 389: 4 [eval # #]
In /usr/local/bin/guile-tools:
 189: 3 [main ("/usr/local/bin/guile-tools" "doc-snarf" "-v")]
In scripts/doc-snarf.scm:
  83: 2 [display-version]
In ice-9/boot-9.scm:
  115: 1 [#<procedure 10a2910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> unbound-variable ...]
In unknown file:
   ?: 0 [catch-closure unbound-variable "module-lookup" ...]


[~]$ guile-tools doc-snarf --he
Backtrace:
In ice-9/boot-9.scm:
 170: 10 [catch #t #<catch-closure b8c0a0> ...]
In unknown file:
   ?: 9 [catch-closure]
In ice-9/boot-9.scm:
  62: 8 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 389: 7 [eval # #]
In /usr/local/bin/guile-tools:
 189: 6 [main ("/usr/local/bin/guile-tools" "doc-snarf" "--he")]
In scripts/doc-snarf.scm:
  99: 5 [doc-snarf "--he"]
In ice-9/getopt-long.scm:
 387: 4 [getopt-long ("doc-snarf" "--he") (# # # # ...)]
 335: 3 [process-options (# # # # ...) ("--he")]
In unknown file:
   ?: 2 [scm-error misc-error #f "~A ~S" ("no such option:" "he") #f]
In ice-9/boot-9.scm:
  115: 1 [#<procedure b49910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> misc-error ...]
In unknown file:
    ?: 0 [catch-closure misc-error #f "~A ~S" ("no such option:" "he") 
#f]

ERROR: In procedure catch-closure:
ERROR: no such option: "he"

[~]$ guile-tools lint -h
Backtrace:
In ice-9/boot-9.scm:
 170: 10 [catch #t #<catch-closure 26040a0> ...]
In unknown file:
   ?: 9 [catch-closure]
In ice-9/boot-9.scm:
  62: 8 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 389: 7 [eval # #]
In /usr/local/bin/guile-tools:
 189: 6 [main ("/usr/local/bin/guile-tools" "lint" "-h")]
In unknown file:
   ?: 5 [for-each #<procedure lint (filename)> ("-h")]
In scripts/lint.scm:
 109: 4 [lint "-h"]
In ice-9/r4rs.scm:
 190: 3 [with-input-from-file "-h" ...]
In unknown file:
   ?: 2 [open-file "-h" "r"]
In ice-9/boot-9.scm:
  115: 1 [#<procedure 25c1910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> system-error ...]
In unknown file:
   ?: 0 [catch-closure system-error "open-file" ...]

ERROR: In procedure open-file:
ERROR: No such file or directory: "-h"


[~]$ guile-tools scan-api
Backtrace:
In ice-9/boot-9.scm:
 170: 8 [catch #t #<catch-closure 1bbe0a0> ...]
In unknown file:
   ?: 7 [catch-closure]
In ice-9/boot-9.scm:
  62: 6 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 389: 5 [eval # #]
In /usr/local/bin/guile-tools:
 189: 4 [main ("/usr/local/bin/guile-tools" "scan-api")]
In scripts/scan-api.scm:
 160: 3 [scan-api]
In unknown file:
   ?: 2 [list-ref () {0}]
In ice-9/boot-9.scm:
  115: 1 [#<procedure 1b7b910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> out-of-range ...]
In unknown file:
   ?: {0} [catch-closure out-of-range "list-ref" ...]

ERROR: In procedure list-ref:
ERROR: Argument 2 out of range: 0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug #32243] guile-tools errors if PROGRAM can't be found
  2011-02-02 19:36 ` Andy Wingo
  2011-02-03 21:21   ` Mark Harig
@ 2011-02-03 22:25   ` Mark Harig
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Harig @ 2011-02-03 22:25 UTC (permalink / raw)
  To: bug-guile

(Re-sending -- This apparently did not get through the mail the first 
time.)

> Follow-up Comment #1:
>
> Fixed in git; thanks for the reminder.

Are the problems described below repaired by the latest fix, also?

[~]$ guile-tools -v
guile-tools (GNU Guile 1.9.15) 2.0
Copyright (C) 2010 Free Software Foundation, Inc.
License LGPLv3+: GNU LGPL version 3 or later 
<http://gnu.org/licenses/lgpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

[~]$ guile-tools doc-snarf -l
Backtrace:
In ice-9/boot-9.scm:
170: 9 [catch #t #<catch-closure 11d40a0> ...]
In unknown file:
  ?: 8 [catch-closure]
In ice-9/boot-9.scm:
 62: 7 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
389: 6 [eval # #]
In /usr/local/bin/guile-tools:
189: 5 [main ("/usr/local/bin/guile-tools" "doc-snarf" "-l")]
In scripts/doc-snarf.scm:
 99: 4 [doc-snarf "-l"]
In ice-9/getopt-long.scm:
  387: 3 [getopt-long ("doc-snarf" "-l") ((version # #) (help # #) 
(output # #) ...)]
In unknown file:
  ?: 2 [scm-error misc-error #f ...]
In ice-9/boot-9.scm:
  115: 1 [#<procedure 1191910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> misc-error ...]
In unknown file:
  ?: 0 [catch-closure misc-error #f ...]

[~]$ guile-tools doc-snarf -v
doc-snarf Backtrace:
In ice-9/boot-9.scm:
170: 7 [catch #t #<catch-closure 10e50a0> ...]
In unknown file:
  ?: 6 [catch-closure]
In ice-9/boot-9.scm:
 62: 5 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
389: 4 [eval # #]
In /usr/local/bin/guile-tools:
189: 3 [main ("/usr/local/bin/guile-tools" "doc-snarf" "-v")]
In scripts/doc-snarf.scm:
 83: 2 [display-version]
In ice-9/boot-9.scm:
  115: 1 [#<procedure 10a2910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> unbound-variable ...]
In unknown file:
  ?: 0 [catch-closure unbound-variable "module-lookup" ...]

[~]$ guile-tools doc-snarf --he
Backtrace:
In ice-9/boot-9.scm:
170: 10 [catch #t #<catch-closure b8c0a0> ...]
In unknown file:
  ?: 9 [catch-closure]
In ice-9/boot-9.scm:
 62: 8 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
389: 7 [eval # #]
In /usr/local/bin/guile-tools:
189: 6 [main ("/usr/local/bin/guile-tools" "doc-snarf" "--he")]
In scripts/doc-snarf.scm:
 99: 5 [doc-snarf "--he"]
In ice-9/getopt-long.scm:
387: 4 [getopt-long ("doc-snarf" "--he") (# # # # ...)]
335: 3 [process-options (# # # # ...) ("--he")]
In unknown file:
  ?: 2 [scm-error misc-error #f "~A ~S" ("no such option:" "he") #f]
In ice-9/boot-9.scm:
  115: 1 [#<procedure b49910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> misc-error ...]
In unknown file:
   ?: 0 [catch-closure misc-error #f "~A ~S" ("no such option:" "he") 
#f]

ERROR: In procedure catch-closure:
ERROR: no such option: "he"

[~]$ guile-tools lint -h
Backtrace:
In ice-9/boot-9.scm:
170: 10 [catch #t #<catch-closure 26040a0> ...]
In unknown file:
  ?: 9 [catch-closure]
In ice-9/boot-9.scm:
 62: 8 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
389: 7 [eval # #]
In /usr/local/bin/guile-tools:
189: 6 [main ("/usr/local/bin/guile-tools" "lint" "-h")]
In unknown file:
  ?: 5 [for-each #<procedure lint (filename)> ("-h")]
In scripts/lint.scm:
109: 4 [lint "-h"]
In ice-9/r4rs.scm:
190: 3 [with-input-from-file "-h" ...]
In unknown file:
  ?: 2 [open-file "-h" "r"]
In ice-9/boot-9.scm:
  115: 1 [#<procedure 25c1910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> system-error ...]
In unknown file:
  ?: 0 [catch-closure system-error "open-file" ...]

ERROR: In procedure open-file:
ERROR: No such file or directory: "-h"

[~]$ guile-tools scan-api
Backtrace:
In ice-9/boot-9.scm:
170: 8 [catch #t #<catch-closure 1bbe0a0> ...]
In unknown file:
  ?: 7 [catch-closure]
In ice-9/boot-9.scm:
 62: 6 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
389: 5 [eval # #]
In /usr/local/bin/guile-tools:
189: 4 [main ("/usr/local/bin/guile-tools" "scan-api")]
In scripts/scan-api.scm:
160: 3 [scan-api]
In unknown file:
  ?: 2 [list-ref () {0}]
In ice-9/boot-9.scm:
  115: 1 [#<procedure 1b7b910 at ice-9/boot-9.scm:110:6 (thrown-k . 
args)> out-of-range ...]
In unknown file:
  ?: {0} [catch-closure out-of-range "list-ref" ...]

ERROR: In procedure list-ref:
ERROR: Argument 2 out of range: 0



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [bug #32243] guile-tools errors if PROGRAM can't be found
  2011-02-03 21:21   ` Mark Harig
@ 2011-02-10 11:19     ` Andy Wingo
  0 siblings, 0 replies; 6+ messages in thread
From: Andy Wingo @ 2011-02-10 11:19 UTC (permalink / raw)
  To: Mark Harig; +Cc: bug-guile, spk121

On Thu 03 Feb 2011 22:21, Mark Harig <idirectscm@aim.com> writes:

> [~]$ guile-tools doc-snarf -l

This is now fixed in git.  getopt-long used to throw to misc-error, and
then rely on the default exception printer.  Now instead it does its own
printing, and calls `(exit 1)'.  That will throw to `quit', which does
not cause a backtrace.

Current output is:

    $ guile-tools doc-snarf -l
    doc-snarf: option must be specified with argument: --lang

Terse, but better.

Thanks for the report,

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-02-10 11:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-25 13:25 [bug #32243] guile-tools errors if PROGRAM can't be found Mike Gran
2011-01-27 10:25 ` Andy Wingo
2011-02-02 19:36 ` Andy Wingo
2011-02-03 21:21   ` Mark Harig
2011-02-10 11:19     ` Andy Wingo
2011-02-03 22:25   ` Mark Harig

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).