From 63284450435d1761e9599322a0a9a750f54c287a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 16 May 2007 21:53:47 +0000 Subject: [PATCH] vm errors from dynamic natives will now be explained more clearly to the calling plugin --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40811 --- core/smn_fakenatives.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/smn_fakenatives.cpp b/core/smn_fakenatives.cpp index 8df20220..ec248837 100644 --- a/core/smn_fakenatives.cpp +++ b/core/smn_fakenatives.cpp @@ -70,11 +70,12 @@ cell_t FakeNativeRouter(IPluginContext *pContext, const cell_t *params, void *pD cell_t result = 0; native->call->PushCell(pCaller->GetMyHandle()); native->call->PushCell(params[0]); - if (native->call->Execute(&result) != SP_ERROR_NONE) + int error; + if ((error=native->call->Execute(&result)) != SP_ERROR_NONE) { if (pContext->GetContext()->n_err == SP_ERROR_NONE) { - pContext->ThrowNativeError("Error encountered while processing a dynamic native"); + pContext->ThrowNativeErrorEx(error, "Error encountered while processing a dynamic native"); } }