From dcf35782d103974869e1cb6a8cdb6131a0a11b01 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sun, 31 Jan 2021 18:48:49 +0200 Subject: [PATCH] Catch more exception types. --- module/Core/Command.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/module/Core/Command.cpp b/module/Core/Command.cpp index 0f342939..a7229aa2 100644 --- a/module/Core/Command.cpp +++ b/module/Core/Command.cpp @@ -382,10 +382,10 @@ int32_t Controller::Exec(Context & ctx) { result = ctx.mInstance->Execute(ctx.mInvoker, args); } - catch (const Sqrat::Exception & e) + catch (const std::exception & e) { // Let's store the exception message - ctx.mBuffer.Write(0, e.what(), static_cast< Buffer::SzType >(e.Message().size())); + ctx.mBuffer.WriteS(0, e.what()); // Specify that the command execution failed failed = true; } @@ -404,10 +404,10 @@ int32_t Controller::Exec(Context & ctx) { result = ctx.mInstance->Execute(ctx.mInvoker, args); } - catch (const Sqrat::Exception & e) + catch (const std::exception & e) { // Let's store the exception message - ctx.mBuffer.Write(0, e.what(), static_cast< Buffer::SzType >(e.Message().size())); + ctx.mBuffer.WriteS(0, e.what()); // Specify that the command execution failed failed = true; }