From 8879c107f3b25cfd51249b75a73cea608a1bf143 Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Tue, 15 Jun 2021 19:02:39 +0200 Subject: Implement WAC --- src/scm/webid-oidc/errors.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/scm/webid-oidc/errors.scm') diff --git a/src/scm/webid-oidc/errors.scm b/src/scm/webid-oidc/errors.scm index 60e45f7..c6802d7 100644 --- a/src/scm/webid-oidc/errors.scm +++ b/src/scm/webid-oidc/errors.scm @@ -920,6 +920,20 @@ container-not-empty? container-not-empty-path) +(define-exception-type + &cannot-fetch-group + &warning + make-cannot-fetch-group + cannot-fetch-group? + (group-uri cannot-fetch-group-group-uri) + (cause cannot-fetch-group-cause)) + +(export &cannot-fetch-group + make-cannot-fetch-group + cannot-fetch-group? + cannot-fetch-group-group-uri + cannot-fetch-group-cause) + (define*-public (error->str err #:key (max-depth #f)) (if (record? err) (let* ((type (record-type-descriptor err)) @@ -1276,6 +1290,10 @@ ((&container-not-empty) (format #f (G_ "the container ~s should be emptied before being deleted") (get 'path))) + ((&cannot-fetch-group) + (format #f (G_ "the group ~s cannot be fetched (because ~a)" + (uri->string (get 'group-uri)) + (recurse (get 'cause))))) ((&compound-exception) (let ((components (get 'components))) (if (null? components) @@ -1312,6 +1330,8 @@ (get 'code))) ((&non-continuable) (format #f (G_ "the program cannot recover from this exception"))) + ((&external-error) + (format #f (G_ "there is an external error"))) ((&error) (format #f (G_ "there is an error"))) (else -- cgit v1.2.3