| 826 | } |
| 827 | |
| 828 | void quit_with_script_error(const String &fn_name) |
| 829 | { |
| 830 | // TODO: clean up the error reporting logic. Now engine will append call |
| 831 | // stack info in quit_check_for_error_state() but only in case of explicit |
| 832 | // script error ("!" type), and not in other case. |
| 833 | const auto &error = cc_get_error(); |
| 834 | if (error.IsUserError) |
| 835 | quitprintf("!Error running function '%s':\n%s", fn_name.GetCStr(), error.ErrorString.GetCStr()); |
| 836 | else |
| 837 | quitprintf("Error running function '%s':\n%s\n\n%s", fn_name.GetCStr(), |
| 838 | error.ErrorString.GetCStr(), error.CallStack.GetCStr()); |
| 839 | } |
| 840 | |
| 841 | struct TempEip { |
| 842 | int oldval; |
no test coverage detected