From 15fc2d76919171a5f3ef1f32654e9509f3b246db Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 23 Oct 2019 14:33:36 +0200 Subject: 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. --- src/cuirass/base.scm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src') 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 -- cgit v1.2.3