diff options
Diffstat (limited to 'bot/src/commands/response_error.hpp')
| -rw-r--r-- | bot/src/commands/response_error.hpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/bot/src/commands/response_error.hpp b/bot/src/commands/response_error.hpp index ae2c3ee..b89d38e 100644 --- a/bot/src/commands/response_error.hpp +++ b/bot/src/commands/response_error.hpp @@ -7,6 +7,7 @@ #include <vector> #include "command.hpp" +#include "localization/line_id.hpp" #include "request.hpp" namespace bot { @@ -23,7 +24,9 @@ namespace bot { EXTERNAL_API_ERROR, INSUFFICIENT_RIGHTS, - ILLEGAL_COMMAND + ILLEGAL_COMMAND, + + LUA_EXECUTION_ERROR }; template <ResponseError T, class Enable = void> @@ -31,9 +34,10 @@ namespace bot { template <ResponseError T> class ResponseException< - T, typename std::enable_if< - T == INCORRECT_ARGUMENT || T == INCOMPATIBLE_NAME || - T == NAMESAKE_CREATION || T == NOT_FOUND>::type> + T, typename std::enable_if<T == INCORRECT_ARGUMENT || + T == INCOMPATIBLE_NAME || + T == NAMESAKE_CREATION || T == NOT_FOUND || + T == LUA_EXECUTION_ERROR>::type> : public std::exception { public: ResponseException(const command::Request &request, @@ -58,6 +62,9 @@ namespace bot { case NOT_FOUND: line_id = loc::LineId::ErrorNotFound; break; + case LUA_EXECUTION_ERROR: + line_id = loc::LineId::ErrorLuaExecutionError; + break; default: line_id = loc::LineId::ErrorSomethingWentWrong; break; |
