Better error message for mcron file loading

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Ahmed Khanzada
Owner
unassigned
Submitted by
Ahmed Khanzada
Severity
normal

Debbugs page

A
A
Ahmed Khanzada wrote on 13 Nov 2021 20:34
(address . guix-patches@gnu.org)
87sfvztkxh.fsf@enzu.ru
I was a bit puzzled why mcron was failing; based on the error, I assumed
file permissions, and did not realize the actual problem was my faulty
syntax within a file.

Until we can get more detailed error messages in place, I propose this
patch to make the current generic error we have slightly more helpful.
Toggle diff (10 lines)
diff --git a/src/mcron/scripts/mcron.scm b/src/mcron/scripts/mcron.scm
index 4c5f7b5..3e581fa 100644
--- a/src/mcron/scripts/mcron.scm
+++ b/src/mcron/scripts/mcron.scm
@@ -93,7 +93,7 @@ $XDG_CONFIG_HOME is not defined uses ~/.config/cron instead)."
"/cron")))
(when (eq? 2 errors)
(mcron-error 13
- "Cannot read files in your ~/.config/cron (or ~/.cron) directory."))))
+ "There was an error reading files in your ~/.config/cron (or ~/.cron) directory. Double-check the folder and file permissions and syntax."))))
L
L
Ludovic Courtès wrote on 17 Nov 2021 08:09
(name . Ahmed Khanzada)(address . me@enzu.ru)(address . 51829@debbugs.gnu.org)
877dd6vk5j.fsf@gnu.org
Hi,

Ahmed Khanzada <me@enzu.ru> skribis:

Toggle quote (9 lines)
> I was a bit puzzled why mcron was failing; based on the error, I assumed
> file permissions, and did not realize the actual problem was my faulty
> syntax within a file.
>
> Until we can get more detailed error messages in place, I propose this
> patch to make the current generic error we have slightly more helpful.
>
> diff --git a/src/mcron/scripts/mcron.scm b/src/mcron/scripts/mcron.scm

Could you send this patch to bug-mcron@gnu.org?

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 17 Nov 2021 08:09
control message for bug #51829
(address . control@debbugs.gnu.org)
875ysqvk58.fsf@gnu.org
tags 51829 wontfix
close 51829
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 51829@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 51829
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch