From 7dd733cf46ab781ce548fe1c7b1a16f8606d3147 Mon Sep 17 00:00:00 2001 From: Asher Baker Date: Wed, 10 Oct 2018 13:35:17 +0100 Subject: [PATCH] Improve CreateNative failure message (#903) This confuses everyone. --- core/logic/smn_fakenatives.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/logic/smn_fakenatives.cpp b/core/logic/smn_fakenatives.cpp index b446d623..a1116a18 100644 --- a/core/logic/smn_fakenatives.cpp +++ b/core/logic/smn_fakenatives.cpp @@ -113,14 +113,14 @@ static cell_t CreateNative(IPluginContext *pContext, const cell_t *params) IPluginFunction *pFunction = pContext->GetFunctionById(params[2]); if (!pFunction) { - return pContext->ThrowNativeError("Function %x is not a valid function", params[2]); + return pContext->ThrowNativeError("Failed to create native \"%s\", function %x is not a valid function", name, params[2]); } pPlugin = g_PluginSys.GetPluginByCtx(pContext->GetContext()); if (!pPlugin->AddFakeNative(pFunction, name, FakeNativeRouter)) { - return pContext->ThrowNativeError("Fatal error creating dynamic native!"); + return pContext->ThrowNativeError("Failed to create native \"%s\", name is probably already in use", name); } return 1;