| 144 | }; |
| 145 | |
| 146 | static std::string FormatScriptError(ScriptError_t err) |
| 147 | { |
| 148 | for (const auto& se : script_errors) |
| 149 | if (se.err == err) |
| 150 | return se.name; |
| 151 | BOOST_ERROR("Unknown scripterror enumeration value, update script_errors in script_tests.cpp."); |
| 152 | return ""; |
| 153 | } |
| 154 | |
| 155 | static ScriptError_t ParseScriptError(const std::string& name) |
| 156 | { |