ref: e673ae661fe3e92bdfa6c14c601bd63254b4ded2
parent: 05c2ee9e519acc69c991cb9ee6173afa4dfcc8e9
author: Tor Andersson <tor.andersson@artifex.com>
date: Thu Jan 8 10:18:58 EST 2015
Clean up some error messages.
--- a/jscompile.c
+++ b/jscompile.c
@@ -1029,7 +1029,7 @@
if (stm->a) {
target = breaktarget(J, F, stm, stm->a->string);
if (!target)
- jsC_error(J, stm, "break label not found: %s", stm->a->string);
+ jsC_error(J, stm, "break label '%s' not found", stm->a->string);
} else {
target = breaktarget(J, F, stm, NULL);
if (!target)
@@ -1043,7 +1043,7 @@
if (stm->a) {
target = continuetarget(J, F, stm, stm->a->string);
if (!target)
- jsC_error(J, stm, "continue label not found: %s", stm->a->string);
+ jsC_error(J, stm, "continue label '%s' not found", stm->a->string);
} else {
target = continuetarget(J, F, stm, NULL);
if (!target)
--- a/jsrun.c
+++ b/jsrun.c
@@ -1208,7 +1208,7 @@
case OP_GETVAR:
str = ST[*pc++];
if (!js_hasvar(J, str))
- js_referenceerror(J, "%s is not defined", str);
+ js_referenceerror(J, "'%s' is not defined", str);
break;
case OP_HASVAR: