From 0408a74b1894fd398b2beac5a84eff5c9dfc7592 Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Mon, 9 Oct 2000 22:08:40 +0000 Subject: [PATCH] Added new condition for non-URL related parsing errors, used in parsing.cl. This needs further reworking, so that URL-related syntax errors are subtypes of this new condition. --- src/main/conditions.cl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/conditions.cl b/src/main/conditions.cl index 435b7ce..504e958 100644 --- a/src/main/conditions.cl +++ b/src/main/conditions.cl @@ -44,3 +44,14 @@ this makes sense.") (report-clash-error condition stream (simple-condition-format-control condition) (simple-condition-format-arguments condition))))) + +(define-condition clash-syntax-error (clash-error) + ((fragment :initarg :fragment :reader clash-syntax-error-fragment) + (reason :initarg :reason :reader clash-syntax-error-reason)) + (:default-initargs :code +HTTP-Code-Bad-Request+) + (:report (lambda (condition stream) + (report-clash-error + condition stream + "Syntax error while parsing ~S: ~A" + (list (clash-syntax-error-fragment condition) + (clash-syntax-error-reason condition))))))