Mercurial > hg > index.cgi
comparison lwasm/pass5.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 | 697bc543368c |
children | 58cafa61ab40 |
comparison
equal
deleted
inserted
replaced
369:682524a1f32f | 370:8764142b3192 |
---|---|
119 // we have non-resolved line addresses here | 119 // we have non-resolved line addresses here |
120 for (cl = sl; cl; cl = cl -> next) | 120 for (cl = sl; cl; cl = cl -> next) |
121 { | 121 { |
122 if (!exprok(as, cl -> addr)) | 122 if (!exprok(as, cl -> addr)) |
123 { | 123 { |
124 lwasm_register_error(as, cl, "Cannot resolve line address"); | 124 lwasm_register_error(as, cl, E_LINE_ADDRESS); |
125 } | 125 } |
126 if (!exprok(as, cl -> daddr)) | 126 if (!exprok(as, cl -> daddr)) |
127 { | 127 { |
128 lwasm_register_error(as, cl, "Cannot resolve line data address"); | 128 lwasm_register_error(as, cl, E_LINED_ADDRESS); |
129 } | 129 } |
130 } | 130 } |
131 } | 131 } |
132 } | 132 } |