Thread (95 messages) 95 messages, 3 authors, 2026-01-23

Re: [PATCH 01/26] rv/rvgen: introduce AutomataError exception class

From: Nam Cao <hidden>
Date: 2026-01-22 14:40:00
Also in: lkml

Gabriele Monaco [off-list ref] writes:
That could be a good tradeoff. Users are developer but (although I'm not sure if
it really happened yet) are not the rvgen developers, they don't need to know
where exactly the code complained, unless it really broke.
All errors that are expected (OSError or wrong format) should have a meaningful
message for the user, I believe by doing that we'd have a pretty clear idea
where the error came from in the code too (e.g. event parsing, opening a file,
etc.).

If the code has a bug, then yes we should throw the exception as is, that's why
I think it's good not to catch Exception, but to catch only the few exceptions
we know can happen, all others would be bugs.
I second this. We should only catch expected exceptions (e.g. the .dot
file is malformed) and print meaningful message. Otherwise, just leave
it uncaught.

While working with rvgen, I usually just remove the try-catch, because
it takes away all the useful debug information while not offering
anything else.

Nam
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help