Commit Graph

2 Commits

Author SHA1 Message Date
Azat Khuzhin
b42f77a791 Covert error codes list to lookup table and drop generation of them. 2020-10-29 10:55:41 +03:00
Azat Khuzhin
3fb8d08dd4 Add errorCodeToName() function
This patch adds errorCode() function that will return macro name by the
exception code, useful for analyzing query_log and similar.

Later some descriptions can be added.

v2: replace hana::map/fusion::vector with external script
v3:
- use binary cmake dir for .sh
- use jump table over suboptimal std::unordered_map (with very poor hash
  function for int -- std::hash)
- cleanup errorCodeToName (drop extra templates and headers)
- rename errorCode -> errorCodeToName
- fix arcadia build (by not providing those helpers there)
- fix build on CI, by using CMAKE_CXX_COMPILER for parsing the file
2020-10-29 10:55:00 +03:00