From fea912baaabb9f39144ea6e9d09e4b09e90cf552 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Fri, 22 Sep 2017 09:56:22 +0100 Subject: [PATCH] Change the InvalidDataException to include the object that threw the validation error. --- volatility/framework/exceptions.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/volatility/framework/exceptions.py b/volatility/framework/exceptions.py index e32079071..d918a1742 100644 --- a/volatility/framework/exceptions.py +++ b/volatility/framework/exceptions.py @@ -41,6 +41,10 @@ class PagedInvalidAddressException(InvalidAddressException): class InvalidDataException(VolatilityException): """Thrown when an object contains some data known to be invalid for that structure""" + def __init__(self, invalid_object, *args): + super.__init__(invalid_object, *args) + self._invalid_object = invalid_object + class SymbolSpaceError(VolatilityException): """Thrown when an error occurs dealing with Symbols and Symbolspaces"""