ZORBA_ERROR_* macros still used

Bug #867117 reported by Paul J. Lucas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Medium
Paul J. Lucas

Bug Description

These old macros are still being used to report errors, e.g., LoadSchemaErrorHandler.cpp lines 67, 86. Additionally, English-only text is being used to construct error messages on-the-fly. All error messages need to have text referenced symbolically via diagnostic dictionary keys and thus be able to be localized.

Please replace all uses of these macros with "throw XQUERY_EXCEPTION( ..., ERROR_PARAMS( ... ), ERROR_LOC( ... ) );" and move all English-only strings to diagnostic_en.xml.

Revision history for this message
Cezar Andrei (cezar-andrei) wrote :

Fixed.

Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

You are still constructing English-only messages on the fly. No English error messages can be hard-coded. All such error strings MUST go into the diagnostics dictionary.

Changed in zorba:
milestone: none → 2.7
Changed in zorba:
milestone: 2.7 → 2.8
Revision history for this message
Chris Hillery (ceejatec) wrote :

Paul - it seems as though the code you were referencing got corrected at some point. I don't see any uses of macros starting with ZORBA_ERROR_ any more.

Can you confirm that all the bad code is gone in core Zorba? If so, please remove any remaining vestiges; I see:

1. "#define ZORBA_ERROR_DESC_OSS ..." in xquery_diagnostics.h (no longer used)
2. "bool const useParam; // if true, msg is a parameter for the ZORBA_ERROR_LOC_PARAM() macro" in parsenode_base.h

which seem undesirable now.

Changed in zorba:
assignee: Cezar Andrei (cezar-andrei) → Paul J. Lucas (paul-lucas)
milestone: 2.8 → 2.9
Changed in zorba:
status: New → Fix Committed
Chris Hillery (ceejatec)
Changed in zorba:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.