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.
This commit is contained in:
@ -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))))))
|
||||
|
||||
Reference in New Issue
Block a user