comparison lwasm/pass4.c @ 370:8764142b3192

Convert internal error/warning handling framework to a new unified system Replace the ad hoc error and warning handling with a new system that codifies the errors with specific codes. This makes it possible in the future for error numbers to be used for testing and other purposes. It also makes sure the error strings themselves are consistent. Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 22 Jun 2015 18:49:38 -0600
parents 8beb109dfd69
children
comparison
equal deleted inserted replaced
369:682524a1f32f 370:8764142b3192
83 { 83 {
84 (instab[sl -> insn].resolve)(as, sl, 1); 84 (instab[sl -> insn].resolve)(as, sl, 1);
85 debug_message(as, 200, "Try resolve = %d/%d", sl -> len, sl -> dlen); 85 debug_message(as, 200, "Try resolve = %d/%d", sl -> len, sl -> dlen);
86 if (force && sl -> len == -1 && sl -> dlen == -1) 86 if (force && sl -> len == -1 && sl -> dlen == -1)
87 { 87 {
88 lwasm_register_error(as, sl, "Instruction failed to resolve."); 88 lwasm_register_error(as, sl, E_INSTRUCTION_FAILED);
89 return; 89 return;
90 } 90 }
91 } 91 }
92 if (sl -> len != -1 && sl -> dlen != -1) 92 if (sl -> len != -1 && sl -> dlen != -1)
93 { 93 {