00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00020 #undef FAL_ENGMSG
00021 #undef FAL_ERRORDECL
00022
00023 #ifdef FLC_DECLARE_ERROR_TABLE
00024
00025 #define FAL_ENGMSG( x, y )
00026 #define FAL_ERRORDECL( errid, code, x ) const int errid = code;
00027 #else
00028
00029 #ifdef FLC_DECLARE_ENGINE_MSG
00030
00031 #define FAL_ENGMSG( msg, x ) int msg;
00032 #define FAL_ERRORDECL( errid, code, x ) int msg_##errid;
00033 #else
00034 #ifdef FLC_REALIZE_ENGINE_MSG
00035
00036 #undef FAL_ENGMSG
00037 #undef FAL_ERRORDECL
00038 #define FAL_ENGMSG( msg, str ) {String *s = new String( str ); s->exported(true); msg = engineStrings->add( s ); }
00039 #define FAL_ERRORDECL( errid, code, str ) {String *s = new String( str ); s->exported(true); msg_##errid = engineStrings->add( s ); }
00040
00041 #else
00042 #ifdef FLC_MAKE_ERROR_MESSAGE_SELECTOR
00043 #define FAL_ENGMSG( msg, str )
00044 #define FAL_ERRORDECL( errid, code, str ) case errid: return Falcon::Engine::getMessage( msg_##errid );
00045 #else
00046
00047
00048 #define FAL_ENGMSG( msg, x ) extern int msg;
00049 #define FAL_ERRORDECL( errid, code, x ) extern int msg_##errid;
00050 #endif
00051 #endif
00052 #endif
00053
00054 #endif
00055
00056
00057
00058
00059
00060
00061 FAL_ENGMSG( msg_banner, "The Falcon Programming Language" );
00062 FAL_ENGMSG( msg_unknown_error, "Unrecognized error code" );
00063 FAL_ENGMSG( msg_io_curdir, "I/O Error in reading current directory" );
00064
00065
00066
00067
00068 FAL_ENGMSG( rtl_start_outrange, "start position out of range" );
00069 FAL_ENGMSG( rtl_array_missing, "required an array, a start and an end position" );
00070 FAL_ENGMSG( rtl_inv_startend, "invalid start/end positions" );
00071 FAL_ENGMSG( rtl_cmdp_0, "parameter array contains non string elements" );
00072 FAL_ENGMSG( rtl_emptyarr, "parameter array is empty" );
00073 FAL_ENGMSG( rtl_iterator_not_found, "\"Iterator\" class not found in VM" );
00074 FAL_ENGMSG( rtl_invalid_iter, "Given item is not a valid iterator for the collection" );
00075 FAL_ENGMSG( rtl_marshall_not_cb, "Marshalled event name must be a string as first element in the given array" );
00076 FAL_ENGMSG( rtl_invalid_path, "Invalid path" );
00077 FAL_ENGMSG( rtl_invalid_uri, "Invalid URI" );
00078 FAL_ENGMSG( rtl_no_tabhead, "First row of the table must be a header" );
00079 FAL_ENGMSG( rtl_invalid_tabhead, "Table header must be composed of strings or future bindings" );
00080 FAL_ENGMSG( rtl_invalid_order, "Table order must be greater than zero" );
00081 FAL_ENGMSG( rtl_invalid_tabrow, "Row inserted in table has different order" );
00082 FAL_ENGMSG( rtl_broken_table, "The table changed during a const operation" );
00083 FAL_ENGMSG( rtl_uncallable_col, "Given column contains some uncallable items" );
00084 FAL_ENGMSG( rtl_no_page, "Page ID not present in table" );
00085 FAL_ENGMSG( rtl_tabhead_given, "Table heading already given" );
00086 FAL_ENGMSG( rtl_string_empty, "Refill string cannot be empty" );
00087 FAL_ENGMSG( rtl_row_out_of_bounds, "Row larger than current page size" );
00088 FAL_ENGMSG( rtl_buffer_full, "Given memory buffer is full" );
00089 FAL_ENGMSG( rtl_zero_size, "Given size less or equal to zero" );
00090
00091
00092
00093
00094
00095 FAL_ERRORDECL( e_none, 0, "No error" );
00096 FAL_ERRORDECL( e_syntax, 1, "Generic syntax error" );
00097 FAL_ERRORDECL( e_unpack_size, 2, "Incompatible unpack size for list assignment" );
00098 FAL_ERRORDECL( e_break_out, 3, "Break outside loops" );
00099 FAL_ERRORDECL( e_continue_out, 4, "Continue outside loops" );
00100 FAL_ERRORDECL( e_div_by_zero, 5, "Division by zero" );
00101 FAL_ERRORDECL( e_mod_by_zero, 6, "Module by zero" );
00102 FAL_ERRORDECL( e_invalid_op, 7, "Invalid operator" );
00103 FAL_ERRORDECL( e_assign_const, 8, "Assignment to a constant" );
00104 FAL_ERRORDECL( e_assign_sym, 9, "Assignment to a non assignable symbol" );
00105 FAL_ERRORDECL( e_static_call, 10, "Non-static method called statically" );
00106 FAL_ERRORDECL( e_global_notin_func, 11, "Global statement not inside a function" );
00107 FAL_ERRORDECL( e_already_def, 12, "Symbol already defined" );
00108 FAL_ERRORDECL( e_inv_token, 13, "Unrecognized token" );
00109 FAL_ERRORDECL( e_undef_sym, 14, "Undefined symbol" );
00110 FAL_ERRORDECL( e_export_all, 15, "Already exported all" );
00111 FAL_ERRORDECL( e_static_notin_func, 16, "Static related instruction outside a function" );
00112 FAL_ERRORDECL( e_invop, 17, "Invalid operands given opcode" );
00113 FAL_ERRORDECL( e_prop_pinit, 18, "Property definition after init definition" );
00114 FAL_ERRORDECL( e_prop_adef, 19, "Property already defined" );
00115 FAL_ERRORDECL( e_stackuf, 20, "Stack underflow" );
00116 FAL_ERRORDECL( e_stackof, 21, "Stack overflow" );
00117 FAL_ERRORDECL( e_arracc, 22, "Access array out of bounds" );
00118 FAL_ERRORDECL( e_nostartsym, 23, "No startup symbol found" );
00119 FAL_ERRORDECL( e_uncaught, 24, "Explicitly raised item is uncaught" );
00120 FAL_ERRORDECL( e_binload, 25, "System error in loading a binary module" );
00121 FAL_ERRORDECL( e_binstartup, 26, "Binary module has not the 'falcon_module_init' startup procedure" );
00122 FAL_ERRORDECL( e_bininit, 27, "Module cannot be initialized" );
00123 FAL_ERRORDECL( e_modver, 28, "Unrecognized module version" );
00124 FAL_ERRORDECL( e_modformat, 29, "Generic falcon module format error" );
00125 FAL_ERRORDECL( e_modio, 30, "I/O error while loading a module" );
00126 FAL_ERRORDECL( e_unclosed_cs, 31, "Unclosed control structure" );
00127 FAL_ERRORDECL( e_runaway_eof, 32, "Parse error at end of file" );
00128
00129 FAL_ERRORDECL( e_prop_acc, 33, "Requested property not found in object" );
00130 FAL_ERRORDECL( e_deadlock, 34, "Deadlock detected" );
00131 FAL_ERRORDECL( e_prov_name, 35, "Operator ''provides'' must be followed by a symbol name" );
00132 FAL_ERRORDECL( e_init_given, 36, "Constructor already declared" );
00133
00134 FAL_ERRORDECL( e_static_const, 37, "Static member initializers must be a constant expression" );
00135 FAL_ERRORDECL( e_inv_inherit, 38, "Class inhertits from a symbol that is not a class" );
00136 FAL_ERRORDECL( e_nonsym_ref, 39, "Trying to get a reference from something that's not a symbol" );
00137
00138 FAL_ERRORDECL( e_no_cls_inst, 40, "No internal class found for standalone object" );
00139 FAL_ERRORDECL( e_switch_clash, 41, "Duplicate or clashing switch case" );
00140 FAL_ERRORDECL( e_switch_default, 42, "Default block already defined in switch" );
00141 FAL_ERRORDECL( e_service_adef, 43, "Service already published" );
00142 FAL_ERRORDECL( e_service_undef, 44, "Required service has not been published" );
00143 FAL_ERRORDECL( e_file_output, 46, "Can't create output file" );
00144 FAL_ERRORDECL( e_domain, 47, "Mathematical domain error" );
00145 FAL_ERRORDECL( e_charRange, 48, "Invalid character while parsing source" );
00146 FAL_ERRORDECL( e_par_close_unbal, 49, "Closing a parenthesis, but never opened" );
00147 FAL_ERRORDECL( e_square_close_unbal, 50, "Closing square bracket, but never opened" );
00148 FAL_ERRORDECL( e_graph_close_unbal, 51, "Closing a bracket, but never opened" );
00149
00150 FAL_ERRORDECL( e_inv_num_format, 52, "Invalid numeric format" );
00151 FAL_ERRORDECL( e_inv_esc_sequence, 53, "Invalid string escape sequence" );
00152 FAL_ERRORDECL( e_numparse_long, 54, "String too long for numeric conversion" );
00153 FAL_ERRORDECL( e_bitwise_op, 55, "Bitwise operation on non-numeric parameters" );
00154 FAL_ERRORDECL( e_switch_body, 56, "Invalid statement in switch body" );
00155 FAL_ERRORDECL( e_select_body, 57, "Invalid statement in select body" );
00156 FAL_ERRORDECL( e_lone_end, 58, "'end' statement without open contexts" );
00157 FAL_ERRORDECL( e_inv_inherit2, 59, "Inheritance from more than one subtree of reflected classes" );
00158 FAL_ERRORDECL( e_byte_access, 60, "Byte accessor [*x] is read-only" );
00159 FAL_ERRORDECL( e_global_again, 61, "Variable was already global" );
00160
00161 FAL_ERRORDECL( e_malformed_uri, 62, "Malformed or invalid URI" );
00162 FAL_ERRORDECL( e_unknown_vfs, 63, "Unknown virtual file system for scheme part in URI" );
00163 FAL_ERRORDECL( e_modname_inv, 64, "Invalid module logical name" );
00164 FAL_ERRORDECL( e_final_inherit, 65, "Inheriting from a final class" );
00165 FAL_ERRORDECL( e_numparse, 66, "Invalid source data while converting to number" );
00166
00167 FAL_ERRORDECL( e_default_decl, 100, "Syntax error in 'default' statement" );
00168 FAL_ERRORDECL( e_case_decl, 101, "Syntax error in case statement" );
00169 FAL_ERRORDECL( e_switch_decl, 103, "Syntax error in 'switch' statement" );
00170 FAL_ERRORDECL( e_select_decl, 104, "Syntax error in 'select' statement" );
00171 FAL_ERRORDECL( e_case_outside, 105, "Statement 'case' is valid only within switch or select statements" );
00172 FAL_ERRORDECL( e_syn_load, 106, "Syntax error in 'load' directive" );
00173 FAL_ERRORDECL( e_toplevel_func, 107, "Functions must be declared at toplevel" );
00174 FAL_ERRORDECL( e_toplevel_obj, 108, "Objects must be declared at toplevel" );
00175 FAL_ERRORDECL( e_toplevel_class, 109, "Classes must be declared at toplevel" );
00176 FAL_ERRORDECL( e_toplevel_load, 110, "Load directive must be called at toplevel" );
00177 FAL_ERRORDECL( e_syn_while , 111, "Syntax error in 'while' statement" );
00178 FAL_ERRORDECL( e_syn_if, 112, "Syntax error in 'if' statement" );
00179 FAL_ERRORDECL( e_syn_else, 113, "Syntax error in 'else' statement" );
00180 FAL_ERRORDECL( e_syn_elif, 114, "Syntax error in 'elif' statement" );
00181 FAL_ERRORDECL( e_syn_break, 115, "Syntax error in 'break' statement" );
00182 FAL_ERRORDECL( e_syn_continue, 116, "Syntax error in 'continue' statement" );
00183 FAL_ERRORDECL( e_syn_for, 117, "Syntax error in 'for' statement" );
00184 FAL_ERRORDECL( e_syn_forfirst, 118, "Syntax error in 'forfirst' statement" );
00185 FAL_ERRORDECL( e_syn_forlast, 119, "Syntax error in 'forlast' statement" );
00186 FAL_ERRORDECL( e_syn_formiddle, 120, "Syntax error in 'formiddle' statement" );
00187 FAL_ERRORDECL( e_syn_try, 121, "Syntax error in 'try' statement" );
00188 FAL_ERRORDECL( e_syn_catch, 122, "Syntax error in 'catch' statement" );
00189 FAL_ERRORDECL( e_syn_raise, 123, "Syntax error in 'raise' statement" );
00190 FAL_ERRORDECL( e_syn_funcdecl, 124, "Syntax error in function declaration" );
00191 FAL_ERRORDECL( e_syn_static, 125, "Syntax error in 'static' statement" );
00192 FAL_ERRORDECL( e_syn_launch, 126, "Syntax error in 'launch' statement" );
00193 FAL_ERRORDECL( e_inv_const_val, 127, "Invalid value for constant declaration" );
00194 FAL_ERRORDECL( e_syn_const, 128, "Syntax error in 'const' statement" );
00195 FAL_ERRORDECL( e_syn_export, 129, "Syntax error in 'export' statement" );
00196 FAL_ERRORDECL( e_syn_forin, 130, "Syntax error in 'for..in' statement" );
00197 FAL_ERRORDECL( e_syn_attrdecl, 131, "Syntax error in attribute declaration" );
00198 FAL_ERRORDECL( e_syn_class, 132, "Syntax error in 'class' statement" );
00199 FAL_ERRORDECL( e_syn_object, 133, "Syntax error in 'object' statement" );
00200 FAL_ERRORDECL( e_syn_global, 134, "Syntax error in 'global' statement" );
00201 FAL_ERRORDECL( e_syn_return, 135, "Syntax error in 'return' statement" );
00202 FAL_ERRORDECL( e_syn_arraccess, 136, "Syntax error in array access" );
00203 FAL_ERRORDECL( e_syn_funcall, 137, "Syntax error in function call" );
00204 FAL_ERRORDECL( e_syn_lambda, 138, "Syntax error in 'lambda' statement" );
00205 FAL_ERRORDECL( e_syn_iif, 139, "Syntax error in '?:' expression" );
00206 FAL_ERRORDECL( e_syn_dictdecl, 140, "Syntax error in dictionary declaration" );
00207 FAL_ERRORDECL( e_syn_arraydecl, 141, "Syntax error in array declaration" );
00208 FAL_ERRORDECL( e_syn_def, 142, "Syntax error in 'def' statement" );
00209 FAL_ERRORDECL( e_syn_fordot, 143, "Syntax error in 'for.' statement" );
00210 FAL_ERRORDECL( e_syn_self_print, 144, "Syntax error in fast print statement" );
00211 FAL_ERRORDECL( e_syn_directive, 145, "Syntax error in directive" );
00212 FAL_ERRORDECL( e_syn_import, 146, "Syntax error in import statement" );
00213 FAL_ERRORDECL( e_syn_macro, 147, "Syntax error in macro definition" );
00214 FAL_ERRORDECL( e_syn_macro_call, 148, "Syntax error in macro call" );
00215 FAL_ERRORDECL( e_syn_loop, 149, "Syntax error in loop statement" );
00216
00217 FAL_ERRORDECL( e_catch_clash, 150, "Duplicate type identifier in catch selector" );
00218 FAL_ERRORDECL( e_catch_adef, 151, "Default catch block already defined" );
00219 FAL_ERRORDECL( e_already_forfirst, 152, "Block 'forfirst' already declared" );
00220 FAL_ERRORDECL( e_already_forlast, 153, "Block 'forlast' already declared" );
00221 FAL_ERRORDECL( e_already_formiddle, 154, "Block 'formiddle' already declared" );
00222 FAL_ERRORDECL( e_fordot_outside, 155, "Statement '.=' must be inside a for/in loop" );
00223 FAL_ERRORDECL( e_par_unbal, 156, "Unbalanced parenthesis at end of file" );
00224 FAL_ERRORDECL( e_square_unbal, 157, "Unbalanced square parenthesis at end of file" );
00225 FAL_ERRORDECL( e_unclosed_string, 158, "Unclosed string at end of file" );
00226 FAL_ERRORDECL( e_graph_unbal, 159, "Unbalanced bracket parenthesis at end of file" );
00227
00228 FAL_ERRORDECL( e_cmp_unprep, 161, "Compiler not prepared (still needs to be fed with a module)" );
00229 FAL_ERRORDECL( e_not_implemented, 162, "Feature not implemented/not available on this instance" );
00230 FAL_ERRORDECL( e_nl_in_lit, 163, "New line in literal string" );
00231 FAL_ERRORDECL( e_fself_outside, 164, "'fself' outside functions or blocks" );
00232 FAL_ERRORDECL( e_undef_param, 165, "Required parameter not found" );
00233 FAL_ERRORDECL( e_noeffect, 166, "Statement has no effect (at least in part)" );
00234 FAL_ERRORDECL( e_ns_clash, 167, "Clash in namespaces aliasing" );
00235 FAL_ERRORDECL( e_directive_unk, 168, "Unknown directive" );
00236 FAL_ERRORDECL( e_directive_value, 169, "Invalid value for directive" );
00237
00238 FAL_ERRORDECL( e_open_file, 200, "Can't open file" );
00239 FAL_ERRORDECL( e_loaderror, 201, "Error in loading a module" );
00240 FAL_ERRORDECL( e_nofile, 202, "File not found" );
00241 FAL_ERRORDECL( e_invformat, 203, "Invalid or damaged Falcon VM file" );
00242 FAL_ERRORDECL( e_loader_unsupported, 204, "Operation not supported by the module loader" );
00243 FAL_ERRORDECL( e_io_error, 205, "Generic I/O Error" );
00244 FAL_ERRORDECL( e_unknown_encoding, 206, "Unknown encoding name" );
00245 FAL_ERRORDECL( e_unrec_file_type, 207, "Unrecognized file type" );
00246 FAL_ERRORDECL( e_io_unsup, 208, "Unrecognized file type" );
00247 FAL_ERRORDECL( e_io_invalid, 209, "Unrecognized file type" );
00248 FAL_ERRORDECL( e_deser_eof, 210, "Hit EOF while deserializing" );
00249 FAL_ERRORDECL( e_search_eof, 211, "Search operation failed or item not found" );
00250
00251 FAL_ERRORDECL( e_fmt_convert, 500, "Format not applicable to object" );
00252 FAL_ERRORDECL( e_interrupted, 501, "Asynchronous wait interruption" );
00253 FAL_ERRORDECL( e_priv_access, 502, "Access to private member not through 'self'" );
00254 FAL_ERRORDECL( e_noninst_cls, 503, "Target class cannot be instantiated" );
00255 FAL_ERRORDECL( e_unserializable, 504, "Object cannot be serialized (because of inner native data)" );
00256 FAL_ERRORDECL( e_uncloneable, 506, "Uncloneable object, as part of it is not available to VM" );
00257 FAL_ERRORDECL( e_prop_ro, 507, "Tried to write a read-only property" );
00258 FAL_ERRORDECL( e_wait_in_atomic, 508, "VM received a suspension request in an atomic operation" );
00259 FAL_ERRORDECL( e_table_aconf, 509, "Table already configured" );
00260 FAL_ERRORDECL( e_non_callable, 510, "Non callable symbol called" );
00261 FAL_ERRORDECL( e_prop_invalid, 511, "Invalid or inconsistent property value" );
00262 FAL_ERRORDECL( e_invalid_iter, 512, "Invalid iterator applied to sequence method" );
00263 FAL_ERRORDECL( e_iter_outrange, 513, "Iterator out of range" );
00264 FAL_ERRORDECL( e_non_dict_seq, 514, "Given sequence is not a dictionary sequence");
00265 FAL_ERRORDECL( e_miss_iface, 515, "Missing interface: needed method not found");
00266 FAL_ERRORDECL( e_acc_forbidden, 516, "Access forbidden");
00267 FAL_ERRORDECL( e_prop_wo, 517, "Tried to read a write-only property" );
00268 FAL_ERRORDECL( e_prop_loop, 518, "Property accessed inside its accessor" );
00269 FAL_ERRORDECL( e_table_empty, 519, "Operation on an empty table" );
00270 FAL_ERRORDECL( e_tabcol_acc, 520, "Table column not found" );
00271
00272 FAL_ERRORDECL( e_inv_params, 900, "Invalid parameters" );
00273 FAL_ERRORDECL( e_missing_params, 901, "Mandatory parameter missing" );
00274 FAL_ERRORDECL( e_param_type, 902, "Invalid parameters type" );
00275 FAL_ERRORDECL( e_param_range, 903, "Parameters content invalid/out of range" );
00276 FAL_ERRORDECL( e_param_indir_code, 904, "Parse error in indirect code" );
00277 FAL_ERRORDECL( e_param_strexp_code, 905, "Parse error in expanded string" );
00278 FAL_ERRORDECL( e_param_fmt_code, 906, "Parse error in format specifier" );
00279
00280
00281