From 2aa69c8f83e2afd25a355bc1c70acb646f425b9f Mon Sep 17 00:00:00 2001 From: zelgadis Date: Tue, 27 May 2008 01:48:13 +0000 Subject: Added "error" channel for runtime errors, and changed error messages that used the "danger" or "warning" channels to use that. Sending an error message to the error channel has the side effect of interrupting all activity. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5276 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/mapmark.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'crawl-ref/source/mapmark.cc') diff --git a/crawl-ref/source/mapmark.cc b/crawl-ref/source/mapmark.cc index d1ea2d624a..1041470e6e 100644 --- a/crawl-ref/source/mapmark.cc +++ b/crawl-ref/source/mapmark.cc @@ -173,14 +173,14 @@ map_lua_marker::map_lua_marker(const std::string &s, const std::string &, if (mapdef_marker) { if (dlua.loadstring(("return " + s).c_str(), "lua_marker")) - mprf(MSGCH_WARN, "lua_marker load error: %s", dlua.error.c_str()); + mprf(MSGCH_ERROR, "lua_marker load error: %s", dlua.error.c_str()); if (!dlua.callfn("dgn_run_map", 1, 1)) - mprf(MSGCH_WARN, "lua_marker exec error: %s", dlua.error.c_str()); + mprf(MSGCH_ERROR, "lua_marker exec error: %s", dlua.error.c_str()); } else { if (dlua.execstring(("return " + s).c_str(), "lua_marker_mapless", 1)) - mprf(MSGCH_WARN, "lua_marker_mapless exec error: %s", + mprf(MSGCH_ERROR, "lua_marker_mapless exec error: %s", dlua.error.c_str()); } check_register_table(); @@ -210,7 +210,7 @@ void map_lua_marker::check_register_table() { if (!lua_istable(dlua, -1)) { - mprf(MSGCH_WARN, "lua_marker: Expected table, didn't get it."); + mprf(MSGCH_ERROR, "lua_marker: Expected table, didn't get it."); initialised = false; return; } @@ -242,7 +242,7 @@ void map_lua_marker::write(writer &outf) const bool init = initialised; if (!get_table()) { - mprf(MSGCH_WARN, "Couldn't find table."); + mprf(MSGCH_ERROR, "Couldn't find table."); init = false; } @@ -322,7 +322,7 @@ bool map_lua_marker::callfn(const char *fn, bool warn_err, int args) const } const bool res = dlua.callfn("dlua_marker_method", args, 1); if (!res && warn_err) - mprf(MSGCH_WARN, "mlua error: %s", dlua.error.c_str()); + mprf(MSGCH_ERROR, "mlua error: %s", dlua.error.c_str()); return (res); } @@ -340,7 +340,7 @@ void map_lua_marker::notify_dgn_event(const dgn_event &e) push_fn_args("event"); clua_push_dgn_event(dlua, &e); if (!dlua.callfn("dlua_marker_method", 4, 0)) - mprf(MSGCH_WARN, "notify_dgn_event: Lua error: %s", + mprf(MSGCH_ERROR, "notify_dgn_event: Lua error: %s", dlua.error.c_str()); } -- cgit v1.2.3-54-g00ecf