Type name of ScriptObjects is now reported as the actual object type (card/set/value/etc.);

Back trace is slightly smarter
Removed move_cursor_with_sort

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@542 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-07-10 14:39:28 +00:00
parent 1ec62f304f
commit d4af90505a
12 changed files with 100 additions and 20 deletions
+1 -13
View File
@@ -131,19 +131,7 @@ ScriptValueP Context::eval(const Script& script, bool useScope) {
const Instruction* instr_bt = script.backtraceSkip(instr - i.data - 2, i.data);
// have we have reached the name
if (instr_bt) {
if (instr_bt->instr == I_GET_VAR) {
throw ScriptError(e.what() + _("\n in function: ") + variable_to_string(instr_bt->data));
} else if (instr_bt->instr == I_MEMBER_C) {
throw ScriptError(e.what() + _("\n in function: ??\?.") + script.constants[instr_bt->data]->operator String());
} else if (instr_bt->instr == I_BINARY && instr_bt->instr2 == I_MEMBER) {
throw ScriptError(e.what() + _("\n in function: ??\?[??\?]"));
} else if (instr_bt->instr == I_BINARY && instr_bt->instr2 == I_ADD) {
throw ScriptError(e.what() + _("\n in function: ??? + ???"));
} else if (instr_bt->instr == I_NOP || instr_bt->instr == I_CALL) {
throw ScriptError(e.what() + _("\n in function: ??\?(??\?)"));
} else {
throw ScriptError(e.what() + _("\n in function: ??\?"));
}
throw ScriptError(e.what() + _("\n in function: ") + script.instructionName(instr_bt));
} else {
throw e; // rethrow
}