guile-user
[Top][All Lists]
Advanced

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

getopt-long bug?


From: Marko Rauhamaa
Subject: getopt-long bug?
Date: Fri, 20 Nov 2015 00:22:34 +0200

I'm using (ice-9 getopt-long) with Guile 2.0.11.

The documentation (<URL: https://www.gnu.org/software/guile/manual/htm
l_node/getopt_002dlong-Reference.html#getopt_002dlong-Reference>)
states:

   getopt-long signals an error if [...]

       A required option is omitted.

The leading comment in the source file is even more explicit:

   ;;; `getopt-long' throws an exception if:
   [...]
   ;;; - a required option is omitted

However, in reality, no exception is thrown. Instead, (getopt-long)
writes an English error message to stderr and calls (exit 1).

I would much prefer the documented behavior. A library function should
neither write to a file nor exit the program unless explicitly requested
by the caller.


Marko



reply via email to

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