X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fcclerrms.c;h=7817744dae6d7fb529ff639e18d661b0023c4559;hp=cff96cc7661ecb3de01d6563cd1b652c3ef0f79e;hb=1346b30779b120691e4145a3578716f77300951e;hpb=77c5a4fca8b516fd39b8ba213daed17a465a6b2a diff --git a/src/cclerrms.c b/src/cclerrms.c index cff96cc..7817744 100644 --- a/src/cclerrms.c +++ b/src/cclerrms.c @@ -1,8 +1,8 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2012 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ -/** +/** * \file cclerrms.c * \brief Implements CCL error code to error string map. * @@ -28,12 +28,18 @@ static char *err_msg_array[] = { "Bad relation", "Left truncation not supported", "Both left - and right truncation not supported", - "Right truncation not supported" + "Right truncation not supported", + "Embedded truncation not supported", + "Single character mask not supported" }; const char *ccl_err_msg(int ccl_errno) { - return err_msg_array[ccl_errno]; + if (ccl_errno >= 0 && + ccl_errno < sizeof(err_msg_array)/sizeof(*err_msg_array)) + return err_msg_array[ccl_errno]; + else + return 0; } /* * Local variables: