shithub: libmujs

Download patch

ref: a381ba196327a606bfe0849436a8955d0cb729fc
parent: 9512755c2ce7e3452c92d9a69a5bb610cdee4139
author: Tor Andersson <[email protected]>
date: Thu Sep 25 10:19:31 EDT 2014

Change error message prefix to 'mujs:'.

--- a/jsstate.c
+++ b/jsstate.c
@@ -18,7 +18,7 @@
 
 static void js_defaultpanic(js_State *J)
 {
-	fprintf(stderr, "libjs: uncaught exception: %s\n", js_tostring(J, -1));
+	fprintf(stderr, "mujs: uncaught exception: %s\n", js_tostring(J, -1));
 	/* return to javascript to abort */
 }
 
@@ -107,7 +107,7 @@
 int js_dostring(js_State *J, const char *source, int report)
 {
 	if (js_try(J)) {
-		fprintf(stderr, "libjs: %s\n", js_tostring(J, -1));
+		fprintf(stderr, "mujs: %s\n", js_tostring(J, -1));
 		js_pop(J, 1);
 		return 1;
 	}
@@ -125,7 +125,7 @@
 int js_dofile(js_State *J, const char *filename)
 {
 	if (js_try(J)) {
-		fprintf(stderr, "libjs: %s\n", js_tostring(J, -1));
+		fprintf(stderr, "mujs: %s\n", js_tostring(J, -1));
 		js_pop(J, 1);
 		return 1;
 	}