CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 04:24:44 GMT
content-type: text/html
content-encoding: gzip
last-modified: Thu, 13 Jul 2023 17:50:22 GMT
cache-control: max-age=2592000, public
expires: Sun, 09 Nov 2025 23:38:17 GMT
vary: Accept-Encoding
access-control-allow-origin: *
x-request-id: 98c9f3560a923450
strict-transport-security: max-age=15552015; preload
x-frame-options: deny
x-xss-protection: 1; mode=block
cf-cache-status: HIT
set-cookie: __cf_bm=p_pKyKoRCdewzOMD3oPaXpXrCDfaIUFwty4J0fFN0fk-1760156684-1.0.1.1-7O79h_vfOLf8AU34XvIFcBK5JLrSAdlvqIPVxhoYZ5kmpzAP2BoJxWUX4T7SZ7tukcDfXI4bp07vHppUSILOMVuj.kORxBycemr1gadS2jY; path=/; expires=Sat, 11-Oct-25 04:54:44 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98cb96eb48b2a9c3-BLR
alt-svc: h3=":443"; ma=86400
[QT] CER-05 Catching dynamic errors from Mary Holstege on 2004-02-15 (public-qt-comments@w3.org from February 2004)
[QT] CER-05 Catching dynamic errors
- From: Mary Holstege <mary@cerisent.com>
- Date: Sun, 15 Feb 2004 11:28:09 -0800
- To: public-qt-comments@w3.org
- Message-ID: <16431.51273.616000.710733@gargle.gargle.HOWL>
Query Lang [2.5.2] Cannot catch errors Dynamic errors can be raised, for example through fn:error(), but there is no means to catch them. This is a serious deficiency for writing robust applications, as one must take immense pains to ensure that no expression can ever, given any set of data, raise a dynamic error if one wants to produce an application level error result instead of an implementation level one. Suggest: add try $expression catch $variable $expression where the variable binds to the error and is an item This expression will return the value of the try clause unless a dynamic error was raised, in which case it will return the value of the catch clause. Example: A function with a parameter that you want to validate using "validate". If it's not valid, the query blows up and cannot recover, for example, by fixing up the bad data. The query should be able to do some internal recovery. Example: A query performs a division somewhere resulting in an xs:decimal, and it happens to result in an overflow, from which the application could benignly recover. The application should be given that chance.
Received on Tuesday, 17 February 2004 11:09:33 UTC