[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Friendlier error messages?
From: |
Alexandru-Sergiu Marton |
Subject: |
Friendlier error messages? |
Date: |
Mon, 01 Mar 2021 11:21:37 +0200 |
User-agent: |
mu4e 1.4.15; emacs 27.1 |
Hello,
I was trying to use mcron to list the scheduled jobs, and I forgot that
"-s" needs an argument so I just ran "mcron -s", which gave me this:
--8<---------------cut here---------------start------------->8---
Backtrace:
5 (primitive-load "/run/current-system/profile/bin/mcron")
In mcron/scripts/mcron.scm:
113:12 4 (main)
In ice-9/getopt-long.scm:
350:6 3 (getopt-long _ _ #:stop-at-first-non-option _)
In ice-9/boot-9.scm:
260:13 2 (for-each #<procedure 7fc16abd7e70 at ice-9/getopt-lon…> …)
In ice-9/getopt-long.scm:
209:28 1 (_ "schedule" _)
In unknown file:
0 (string->number #t #<undefined>)
ERROR: In procedure string->number:
In procedure string->number: Wrong type argument in position 1 (expecting
string): #t
--8<---------------cut here---------------end--------------->8---
Now that I reread the man page, I understand what's it referring to, but
at a first glance it's not really that clear that the problem was a
missing argument to "-s".
I don't know how the library to parse CLI arguments works in Guile, so
maybe it's more of a problem on that side, than on mcron's side, but my
interest would be in friendlier error messages when parsing of CLI
arguments fails, not a backtrace. Please tell me if this is not the
place to discuss this and I'll search for the right one.
--
Alexandru-Sergiu Marton
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Friendlier error messages?,
Alexandru-Sergiu Marton <=