| 7 | // void script_dbg_dump_stack(const String &prefix); |
| 8 | |
| 9 | static String create_error(ScriptError err, const String& msg1, const String& msg2) |
| 10 | { |
| 11 | String err_str = String::FromPrintf("%s %s\n", msg1.C_Str(), msg2.C_Str()); |
| 12 | |
| 13 | switch (err) |
| 14 | { |
| 15 | case ScriptError::FileError: err_str += String::FromPrintf("file error\n"); break; |
| 16 | case ScriptError::SyntaxError: err_str += String::FromPrintf("syntax error:\n%s\n", GetErrMsg().C_Str()); break; |
| 17 | case ScriptError::RunError: err_str += String::FromPrintf("run error:\n%s\n", GetErrMsg().C_Str()); break; |
| 18 | |
| 19 | case ScriptError::UnknownError: |
| 20 | default: err_str += String::FromPrintf("unknown error\n"); |
| 21 | } |
| 22 | |
| 23 | return err_str; |
| 24 | } |
| 25 | |
| 26 | KYTY_STATIC_SCRIPT_FUNC(dofile) |
| 27 | { |
no outgoing calls
no test coverage detected