diff 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
line wrap: on
line diff
--- a/lwasm/pass5.c	Mon Jun 22 18:38:30 2015 -0600
+++ b/lwasm/pass5.c	Mon Jun 22 18:49:38 2015 -0600
@@ -121,11 +121,11 @@
 		{
 			if (!exprok(as, cl -> addr))
 			{
-				lwasm_register_error(as, cl, "Cannot resolve line address");
+				lwasm_register_error(as, cl, E_LINE_ADDRESS);
 			}
 			if (!exprok(as, cl -> daddr))
 			{
-				lwasm_register_error(as, cl, "Cannot resolve line data address");
+				lwasm_register_error(as, cl, E_LINED_ADDRESS);
 			}
 		}
 	}