summaryrefslogtreecommitdiff
path: root/src/scm/webid-oidc/errors.scm
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-06-15 19:02:39 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-06-19 15:44:36 +0200
commitc8d7e4d3bb40b878648506b50d7b6bc3aab537f0 (patch)
treed9d4da0d3331c791365c279c37d11282f49fff6b /src/scm/webid-oidc/errors.scm
parent649c7dd779c0000b8df6bef35cf23b323e3b27df (diff)
Implement WAC
Diffstat (limited to 'src/scm/webid-oidc/errors.scm')
-rw-r--r--src/scm/webid-oidc/errors.scm20
1 files changed, 20 insertions, 0 deletions
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