diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-27 01:48:13 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-27 01:48:13 +0000 |
commit | 2aa69c8f83e2afd25a355bc1c70acb646f425b9f (patch) | |
tree | 5ecb316636fce46b3f62d9c4eb8bd1c983a58871 /crawl-ref/source/mapmark.cc | |
parent | 298d76bd71d68a4e8d3b9ceafbdad1aece9a8f44 (diff) | |
download | crawl-ref-2aa69c8f83e2afd25a355bc1c70acb646f425b9f.tar.gz crawl-ref-2aa69c8f83e2afd25a355bc1c70acb646f425b9f.zip |
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
Diffstat (limited to 'crawl-ref/source/mapmark.cc')
-rw-r--r-- | crawl-ref/source/mapmark.cc | 14 |
1 files changed, 7 insertions, 7 deletions
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()); } |