summaryrefslogtreecommitdiff
path: root/src/scm/webid-oidc/errors.scm
diff options
context:
space:
mode:
Diffstat (limited to 'src/scm/webid-oidc/errors.scm')
-rw-r--r--src/scm/webid-oidc/errors.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/scm/webid-oidc/errors.scm b/src/scm/webid-oidc/errors.scm
index 27dc6e2..b575a77 100644
--- a/src/scm/webid-oidc/errors.scm
+++ b/src/scm/webid-oidc/errors.scm
@@ -54,6 +54,16 @@
(raise-exception
((record-constructor &not-a-jwk) value cause)))
+(define-public &unsupported-alg
+ (make-exception-type
+ '&unsupported-alg
+ &external-error
+ '(value)))
+
+(define-public (raise-unsupported-alg value)
+ (raise-exception
+ ((record-constructor &unsupported-alg) value)))
+
(define*-public (error->str err #:key (max-depth #f))
(if (record? err)
(let* ((type (record-type-descriptor err))
@@ -82,6 +92,9 @@
(get 'value) cause)
(format #f (G_ "the value ~s does not identify a JWK")
(get 'value)))))
+ ((&unsupported-alg)
+ (format #f (G_ "the value ~s does not identify a hash algorithm")
+ (get 'value)))
((&compound-exception)
(let ((components (get 'components)))
(if (null? components)
@@ -108,6 +121,8 @@
(exception-irritants err)))
((&exception-with-kind-and-args)
(format #f (G_ "there is a kind and args")))
+ ((&assertion-failure)
+ (format #f (G_ "there is an assertion failure")))
(else
(error (format #f (G_ "Unhandled exception type ~a.")
(record-type-name type))))))