aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-10-23 14:33:36 +0200
committerLudovic Courtès <ludo@gnu.org>2019-10-23 14:53:50 +0200
commit15fc2d76919171a5f3ef1f32654e9509f3b246db (patch)
treeda8864b28267e0326c90d2bc4d37b5c7e35e019b
parentc96863bc7cc019661dc3235bbb3fbdb870b3d474 (diff)
downloadcuirass-15fc2d76919171a5f3ef1f32654e9509f3b246db.tar
cuirass-15fc2d76919171a5f3ef1f32654e9509f3b246db.tar.gz
base: Log the evaluation ID upon evaluation failure.
* src/cuirass/base.scm (&evaluation-error)[id]: New field. (evaluate): Specify the 'id' field. (process-specs): Show the log file name upon evaluation failure.
-rw-r--r--src/cuirass/base.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm
index 00b1daa..3dbc5f4 100644
--- a/src/cuirass/base.scm
+++ b/src/cuirass/base.scm
@@ -258,7 +258,8 @@ TARGET beforehand if it exists. Return TARGET."
(define-condition-type &evaluation-error &error
evaluation-error?
- (name evaluation-error-spec-name))
+ (name evaluation-error-spec-name)
+ (id evaluation-error-id))
(define (non-blocking-port port)
"Make PORT non-blocking and return it."
@@ -351,7 +352,8 @@ Return a list of jobs that are associated to EVAL-ID."
(close-port (cdr log-pipe))
(raise (condition
(&evaluation-error
- (name (assq-ref spec #:name))))))
+ (name (assq-ref spec #:name))
+ (id eval-id)))))
(data data))))
(close-port (cdr log-pipe))
(close-pipe port)
@@ -764,8 +766,10 @@ started)."
(spawn-fiber
(lambda ()
(guard (c ((evaluation-error? c)
- (log-message "failed to evaluate spec '~a'"
- (evaluation-error-spec-name c))
+ (log-message "failed to evaluate spec '~a'; see ~a"
+ (evaluation-error-spec-name c)
+ (evaluation-log-file
+ (evaluation-error-id c)))
#f))
(log-message "evaluating spec '~a'" name)
(with-store store