From 0f9a9f5d11f0f8089048cddc7d2df36c7f83345d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 24 Feb 2012 12:36:53 +0100 Subject: [PATCH] zoom: tune CCL to Z39.50 diagnostics mapping Throw Bib-1: 108 "Malformed query" for syntax errors and related ones; throw Bib-1: 3 "Unsupported search" for everything else. Details from the CCL parser is provided as additional-info. --- src/filter_zoom.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index 0931029..97a1fde 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -1851,12 +1851,16 @@ next_proxy: switch (cerror) { case CCL_ERR_UNKNOWN_QUAL: - error = YAZ_BIB1_UNSUPP_USE_ATTRIBUTE; - break; case CCL_ERR_TRUNC_NOT_LEFT: case CCL_ERR_TRUNC_NOT_RIGHT: case CCL_ERR_TRUNC_NOT_BOTH: - error = YAZ_BIB1_UNSUPP_TRUNCATION_ATTRIBUTE; +#ifdef CCL_ERR_TRUNC_NOT_EMBED + case CCL_ERR_TRUNC_NOT_EMBED: +#endif +#ifdef CCL_ERR_TRUNC_NOT_SINGLE + case CCL_ERR_TRUNC_NOT_SINGLE: +#endif + error = YAZ_BIB1_UNSUPP_SEARCH; break; } log_diagnostic(package, error, addinfo); -- 1.7.10.4