diff --git a/slothy/helper.py b/slothy/helper.py index fc2b76f7..b8a1bb22 100644 --- a/slothy/helper.py +++ b/slothy/helper.py @@ -1334,11 +1334,11 @@ def run_code(code, txt=None): mu.emu_start(CODE_BASE + offset, CODE_BASE + len(objcode)) else: mu.emu_start(CODE_BASE + offset, CODE_END) - except: + except UcError as e: log.error("Failed to emulate code using unicorn engine") log.error("Code") log.error(SourceLine.write_multiline(code)) - raise SelfTestException("Selftest failed: Unicorn failed to emulate code") + raise SelfTestException(f"Selftest failed: Unicorn failed to emulate code: {str(e)}") from e final_register_contents = {} for r in regs: