yara-python icon indicating copy to clipboard operation
yara-python copied to clipboard

Add context to yara.Error exception

Open jipegit opened this issue 6 years ago • 4 comments

It would be very useful to add context to yara.Error Exception, especially the rule name causing internal errors (TOO_MANY_MATCHES or else).

jipegit avatar Mar 05 '19 15:03 jipegit

I have a patch almost ready to do this but I got pulled into some stuff for $job so give me a little more time. :)

I'm switching yara-python over to using the (relatively new) scanner API. It's mostly done, just have to fix up support for external variables.

wxsBSD avatar Mar 06 '19 03:03 wxsBSD

@jipegit Would you be willing to try out the scanner_api branch on my fork? I'm not super happy with the changes in it, but it seems to work well for me (and passes tests). I'll have to come up with a better way to handle errors so it isn't so cumbersome, but I'd appreciate any testing you can do on it.

wxsBSD avatar Mar 08 '19 03:03 wxsBSD

Did some testing and it looks ok to me.

Thank you!

jipegit avatar Mar 11 '19 16:03 jipegit

I haven’t actually submitted this yet. Would you please reopen and I’ll see if I can clean it up and get it submitted?

wxsBSD avatar Mar 11 '19 17:03 wxsBSD