diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2020-01-01 00:00:00 +0100 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-06-19 15:44:24 +0200 |
commit | 2fc254c809e42029f28982404870604633b35521 (patch) | |
tree | 7d7d32a3e7560bb165fe1ea2f6f96ad82a7e3f4a /src/scm/webid-oidc/errors.scm | |
parent | 6bc2ce4c55af6d3f3af7be494c149cbe33d6e08e (diff) |
Add a hash function
Diffstat (limited to 'src/scm/webid-oidc/errors.scm')
-rw-r--r-- | src/scm/webid-oidc/errors.scm | 15 |
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 ¬-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)))))) |