diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-03-17 22:14:18 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-03-28 14:17:01 +0200 |
commit | 1da5a277188a954d881316cb605962ee66053285 (patch) | |
tree | 4f77be46498f321d08bfaa072636e4fd252b4f9d /module/calp/main.scm | |
parent | Unsmarted define-config% (diff) | |
download | calp-1da5a277188a954d881316cb605962ee66053285.tar.gz calp-1da5a277188a954d881316cb605962ee66053285.tar.xz |
Normalize errors.
Diffstat (limited to 'module/calp/main.scm')
-rw-r--r-- | module/calp/main.scm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/module/calp/main.scm b/module/calp/main.scm index 18b8b731..607b9f1b 100644 --- a/module/calp/main.scm +++ b/module/calp/main.scm @@ -120,8 +120,11 @@ (cond [altconfig (if (file-exists? altconfig) altconfig - (throw 'option-error - "Configuration file ~a missing" altconfig))] + (scm-error 'misc-error + "wrapped-main" + "Configuration file ~a missing" + (list altconfig) + #f))] ;; altconfig could be placed in the list below. But I want to raise an error ;; if an explicitly given config is missing. [(find file-exists? @@ -213,7 +216,10 @@ (when (option-ref opts 'update-zoneinfo #f) (let* ((locations (list "/usr/libexec/calp/tzget" (path-append (xdg-data-home) "tzget"))) (filename (or (find file-exists? locations) - (error "tzget not installed, please put it in one of ~a" locations))) + (scm-error 'missing-helper "wrapped-main" + "tzget not installed, please put it in one of ~a" + (list locations) + (list "tzget" locations)))) (pipe (open-input-pipe filename))) ;; (define path (read-line pipe)) |