[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ms25soch.fsf@yellow.woof>
Date: Thu, 22 Jan 2026 15:39:58 +0100
From: Nam Cao <namcao@...utronix.de>
To: Gabriele Monaco <gmonaco@...hat.com>, Wander Lairson Costa
<wander@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, open list
<linux-kernel@...r.kernel.org>, "open list:RUNTIME VERIFICATION
(RV)" <linux-trace-kernel@...r.kernel.org>
Subject: Re: [PATCH 01/26] rv/rvgen: introduce AutomataError exception class
Gabriele Monaco <gmonaco@...hat.com> 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
Powered by blists - more mailing lists