From: <di...@us...> - 2013-09-04 07:21:01
|
Revision: 58566 http://sourceforge.net/p/firebird/code/58566 Author: dimitr Date: 2013-09-04 07:20:56 +0000 (Wed, 04 Sep 2013) Log Message: ----------- Improved the error reporting. Modified Paths: -------------- firebird/trunk/lang_helpers/gds_codes.ftn firebird/trunk/lang_helpers/gds_codes.pas firebird/trunk/src/dsql/ExprNodes.cpp firebird/trunk/src/dsql/StmtNodes.cpp firebird/trunk/src/include/gen/codetext.h firebird/trunk/src/include/gen/iberror.h firebird/trunk/src/include/gen/msgs.h firebird/trunk/src/include/gen/sql_code.h firebird/trunk/src/include/gen/sql_state.h firebird/trunk/src/msgs/facilities2.sql firebird/trunk/src/msgs/messages2.sql firebird/trunk/src/msgs/system_errors2.sql Modified: firebird/trunk/lang_helpers/gds_codes.ftn =================================================================== --- firebird/trunk/lang_helpers/gds_codes.ftn 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/lang_helpers/gds_codes.ftn 2013-09-04 07:20:56 UTC (rev 58566) @@ -1528,6 +1528,8 @@ PARAMETER (GDS__include_miss = 335545057) INTEGER*4 GDS__protect_ownership PARAMETER (GDS__protect_ownership = 335545058) + INTEGER*4 GDS__badvarnum + PARAMETER (GDS__badvarnum = 335545059) INTEGER*4 GDS__gfix_db_name PARAMETER (GDS__gfix_db_name = 335740929) INTEGER*4 GDS__gfix_invalid_sw Modified: firebird/trunk/lang_helpers/gds_codes.pas =================================================================== --- firebird/trunk/lang_helpers/gds_codes.pas 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/lang_helpers/gds_codes.pas 2013-09-04 07:20:56 UTC (rev 58566) @@ -771,6 +771,7 @@ gds_include_depth = 335545056; gds_include_miss = 335545057; gds_protect_ownership = 335545058; + gds_badvarnum = 335545059; gds_gfix_db_name = 335740929; gds_gfix_invalid_sw = 335740930; gds_gfix_incmp_sw = 335740932; Modified: firebird/trunk/src/dsql/ExprNodes.cpp =================================================================== --- firebird/trunk/src/dsql/ExprNodes.cpp 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/dsql/ExprNodes.cpp 2013-09-04 07:20:56 UTC (rev 58566) @@ -11109,7 +11109,7 @@ vec<DeclareVariableNode*>* vector = csb->csb_variables; if (!vector || n >= vector->count()) - PAR_syntax_error(csb, "variable identifier"); + PAR_error(csb, Arg::Gds(isc_badvarnum)); VariableNode* node = FB_NEW(pool) VariableNode(pool); node->varId = n; @@ -11208,7 +11208,7 @@ vec<DeclareVariableNode*>* vector = csb->csb_variables; if (!vector || varId >= vector->count() || !(varDecl = (*vector)[varId])) - PAR_syntax_error(csb, "variable identifier"); + PAR_error(csb, Arg::Gds(isc_badvarnum)); return this; } Modified: firebird/trunk/src/dsql/StmtNodes.cpp =================================================================== --- firebird/trunk/src/dsql/StmtNodes.cpp 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/dsql/StmtNodes.cpp 2013-09-04 07:20:56 UTC (rev 58566) @@ -3593,7 +3593,7 @@ vec<DeclareVariableNode*>* vector = csb->csb_variables; if (!vector || node->varId >= vector->count()) - PAR_syntax_error(csb, "variable identifier"); + PAR_error(csb, Arg::Gds(isc_badvarnum)); return node; } @@ -3626,7 +3626,7 @@ vec<DeclareVariableNode*>* vector = csb->csb_variables; if (!vector || varId >= vector->count() || !(varDecl = (*vector)[varId])) - PAR_syntax_error(csb, "variable identifier"); + PAR_error(csb, Arg::Gds(isc_badvarnum)); return this; } Modified: firebird/trunk/src/include/gen/codetext.h =================================================================== --- firebird/trunk/src/include/gen/codetext.h 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/include/gen/codetext.h 2013-09-04 07:20:56 UTC (rev 58566) @@ -760,6 +760,7 @@ {"include_depth", 335545056}, {"include_miss", 335545057}, {"protect_ownership", 335545058}, + {"badvarnum", 335545059}, {"gfix_db_name", 335740929}, {"gfix_invalid_sw", 335740930}, {"gfix_incmp_sw", 335740932}, Modified: firebird/trunk/src/include/gen/iberror.h =================================================================== --- firebird/trunk/src/include/gen/iberror.h 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/include/gen/iberror.h 2013-09-04 07:20:56 UTC (rev 58566) @@ -794,6 +794,7 @@ const ISC_STATUS isc_include_depth = 335545056L; const ISC_STATUS isc_include_miss = 335545057L; const ISC_STATUS isc_protect_ownership = 335545058L; +const ISC_STATUS isc_badvarnum = 335545059L; const ISC_STATUS isc_gfix_db_name = 335740929L; const ISC_STATUS isc_gfix_invalid_sw = 335740930L; const ISC_STATUS isc_gfix_incmp_sw = 335740932L; @@ -1238,7 +1239,7 @@ const ISC_STATUS isc_trace_switch_param_miss = 337182758L; const ISC_STATUS isc_trace_param_act_notcompat = 337182759L; const ISC_STATUS isc_trace_mandatory_switch_miss = 337182760L; -const ISC_STATUS isc_err_max = 1182; +const ISC_STATUS isc_err_max = 1183; #else /* c definitions */ @@ -2002,6 +2003,7 @@ #define isc_include_depth 335545056L #define isc_include_miss 335545057L #define isc_protect_ownership 335545058L +#define isc_badvarnum 335545059L #define isc_gfix_db_name 335740929L #define isc_gfix_invalid_sw 335740930L #define isc_gfix_incmp_sw 335740932L @@ -2446,7 +2448,7 @@ #define isc_trace_switch_param_miss 337182758L #define isc_trace_param_act_notcompat 337182759L #define isc_trace_mandatory_switch_miss 337182760L -#define isc_err_max 1182 +#define isc_err_max 1183 #endif Modified: firebird/trunk/src/include/gen/msgs.h =================================================================== --- firebird/trunk/src/include/gen/msgs.h 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/include/gen/msgs.h 2013-09-04 07:20:56 UTC (rev 58566) @@ -129,7 +129,7 @@ {335544426, "context not defined (BLR error)"}, /* ctxnotdef */ {335544427, "data operation not supported"}, /* datnotsup */ {335544428, "undefined message number"}, /* badmsgnum */ - {335544429, "bad parameter number"}, /* badparnum */ + {335544429, "undefined parameter number"}, /* badparnum */ {335544430, "unable to allocate memory from operating system"}, /* virmemexh */ {335544431, "blocking signal has been received"}, /* blocking_signal */ {335544432, "lock manager error"}, /* lockmanerr */ @@ -763,6 +763,7 @@ {335545056, "Include depth too big"}, /* include_depth */ {335545057, "File to include not found"}, /* include_miss */ {335545058, "Only the owner can change the ownership"}, /* protect_ownership */ + {335545059, "undefined variable number"}, /* badvarnum */ {335740929, "data base file name (@1) already given"}, /* gfix_db_name */ {335740930, "invalid switch @1"}, /* gfix_invalid_sw */ {335740932, "incompatible switch combination"}, /* gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_code.h =================================================================== --- firebird/trunk/src/include/gen/sql_code.h 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/include/gen/sql_code.h 2013-09-04 07:20:56 UTC (rev 58566) @@ -759,6 +759,7 @@ {335545056, -902}, /* 736 include_depth */ {335545057, -902}, /* 737 include_miss */ {335545058, -552}, /* 738 protect_ownership */ + {335545059, -901}, /* 739 badvarnum */ {335740929, -901}, /* 1 gfix_db_name */ {335740930, -901}, /* 2 gfix_invalid_sw */ {335740932, -901}, /* 4 gfix_incmp_sw */ Modified: firebird/trunk/src/include/gen/sql_state.h =================================================================== --- firebird/trunk/src/include/gen/sql_state.h 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/include/gen/sql_state.h 2013-09-04 07:20:56 UTC (rev 58566) @@ -759,6 +759,7 @@ {335545056, "XX000"}, // 736 include_depth {335545057, "XX000"}, // 737 include_miss {335545058, "28000"}, // 738 protect_ownership + {335545059, "HY000"}, // 739 badvarnum {335740929, "00000"}, // 1 gfix_db_name {335740930, "00000"}, // 2 gfix_invalid_sw {335740932, "00000"}, // 4 gfix_incmp_sw Modified: firebird/trunk/src/msgs/facilities2.sql =================================================================== --- firebird/trunk/src/msgs/facilities2.sql 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/msgs/facilities2.sql 2013-09-04 07:20:56 UTC (rev 58566) @@ -1,7 +1,7 @@ /* MAX_NUMBER is the next number to be used, always one more than the highest message number. */ set bulk_insert INSERT INTO FACILITIES (LAST_CHANGE, FACILITY, FAC_CODE, MAX_NUMBER) VALUES (?, ?, ?, ?); -- -('2013-08-04 17:52:41', 'JRD', 0, 739) +('2013-09-04 11:02:00', 'JRD', 0, 740) ('2012-01-23 20:10:30', 'QLI', 1, 532) ('2009-07-16 05:26:11', 'GFIX', 3, 121) ('1996-11-07 13:39:40', 'GPRE', 4, 1) Modified: firebird/trunk/src/msgs/messages2.sql =================================================================== --- firebird/trunk/src/msgs/messages2.sql 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/msgs/messages2.sql 2013-09-04 07:20:56 UTC (rev 58566) @@ -197,7 +197,7 @@ ('ctxnotdef', NULL, NULL, NULL, 0, 106, NULL, 'context not defined (BLR error)', NULL, NULL); ('datnotsup', NULL, NULL, NULL, 0, 107, NULL, 'data operation not supported', NULL, NULL); ('badmsgnum', NULL, NULL, NULL, 0, 108, NULL, 'undefined message number', NULL, NULL); -('badparnum', NULL, NULL, NULL, 0, 109, NULL, 'bad parameter number', NULL, NULL); +('badparnum', NULL, NULL, NULL, 0, 109, NULL, 'undefined parameter number', NULL, NULL); ('virmemexh', NULL, NULL, NULL, 0, 110, NULL, 'unable to allocate memory from operating system', NULL, NULL); ('blocking_signal', NULL, NULL, NULL, 0, 111, NULL, 'blocking signal has been received', NULL, NULL); ('lockmanerr', NULL, NULL, NULL, 0, 112, NULL, 'lock manager error', NULL, NULL); @@ -846,6 +846,7 @@ ('include_depth', NULL, 'config_file.cpp', NULL, 0, 736, NULL, 'Include depth too big', NULL, NULL); ('include_miss', NULL, 'config_file.cpp', NULL, 0, 737, NULL, 'File to include not found', NULL, NULL); ('protect_ownership', 'check_owner', 'vio.cpp', NULL, 0, 738, NULL, 'Only the owner can change the ownership', NULL, NULL); +('badvarnum', NULL, NULL, NULL, 0, 739, NULL, 'undefined variable number', NULL, NULL); -- QLI (NULL, NULL, NULL, NULL, 1, 0, NULL, 'expected type', NULL, NULL); (NULL, NULL, NULL, NULL, 1, 1, NULL, 'bad block type', NULL, NULL); Modified: firebird/trunk/src/msgs/system_errors2.sql =================================================================== --- firebird/trunk/src/msgs/system_errors2.sql 2013-09-04 06:01:55 UTC (rev 58565) +++ firebird/trunk/src/msgs/system_errors2.sql 2013-09-04 07:20:56 UTC (rev 58566) @@ -745,6 +745,7 @@ (-902, 'XX', '000', 0, 736, 'include_depth', NULL, NULL) (-902, 'XX', '000', 0, 737, 'include_miss', NULL, NULL) (-552, '28', '000', 0, 738, 'protect_ownership', NULL, NULL) +(-901, 'HY', '000', 0, 739, 'badvarnum', NULL, NULL) -- GFIX (-901, '00', '000', 3, 1, 'gfix_db_name', NULL, NULL) (-901, '00', '000', 3, 2, 'gfix_invalid_sw', NULL, NULL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |