From 8d79e3211ba2e8ea751c657b5da9f99a8b3a90c2 Mon Sep 17 00:00:00 2001 From: Abyss Watcher Date: Sat, 2 Mar 2024 17:30:51 +0100 Subject: [PATCH] prefer TypeError to vollog.error --- volatility3/framework/plugins/mac/dmesg.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/volatility3/framework/plugins/mac/dmesg.py b/volatility3/framework/plugins/mac/dmesg.py index a006ff854..b837b9db6 100644 --- a/volatility3/framework/plugins/mac/dmesg.py +++ b/volatility3/framework/plugins/mac/dmesg.py @@ -40,10 +40,9 @@ class Dmesg(interfaces.plugins.PluginInterface): kernel = context.modules[kernel_module_name] if not kernel.has_symbol("msgbufp"): - vollog.error( + raise TypeError( 'The provided symbol table does not include the "msgbufp" symbol. This means you are either analyzing an unsupported kernel version or that your symbol table is corrupt.' ) - return [] msgbufp_ptr = kernel.object_from_symbol(symbol_name="msgbufp") msgbufp = msgbufp_ptr.dereference()