From 0c6a220643aff63629d289fd91f85e5256330177 Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Thu, 17 Nov 2016 16:58:44 -0700 Subject: [PATCH] Suppress logging of "Plugin not runnable" errors SourceMod itself and thirdparty extensions call functions in plugins without making sure it is runnable. The plugin pausing feature isn't supported anymore and is set to get nuked #438 which will reduce the amount of not-runnable error reports. We can't fix every third party extension, so suppressing the error from the logs will stop the spam until pausing is removed. This is a backport of #558 to the 1.8 branch. --- core/logic/DebugReporter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/logic/DebugReporter.cpp b/core/logic/DebugReporter.cpp index 93fd5c412..2ff7d2c7c 100644 --- a/core/logic/DebugReporter.cpp +++ b/core/logic/DebugReporter.cpp @@ -180,6 +180,13 @@ void DebugReport::ReportError(const IErrorReport &report, IFrameIterator &iter) } iter.Reset(); + + // Don't log an error if a function wasn't runnable. + // This is necassary due to the way SM is handling and exposing + // scripted functions. It's too late to change that now. + // Make sure this error wasn't manually thrown by a plugin. + if (!blame && !strcmp(report.Message(), "Plugin not runnable")) + return; g_Logger.LogError("[SM] Exception reported: %s", report.Message());