summaryrefslogtreecommitdiff
path: root/rust/kernel/interop/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorWander Lairson Costa <wander@redhat.com>2026-02-23 13:17:44 -0300
committerGabriele Monaco <gmonaco@redhat.com>2026-03-31 16:47:50 +0200
commita115ee5a32275d5f171506dc65e2130e218d2117 (patch)
tree295be465f93b41d43d3cc1bdebc0b822029910e1 /rust/kernel/interop/git@git.tavy.me:linux-stable.git
parentb133207deb72609ad4da40c4d50128a5e150677b (diff)
rv/rvgen: introduce AutomataError exception class
Replace the generic except Exception block with a custom AutomataError class that inherits from Exception. This provides more precise exception handling for automata parsing and validation errors while avoiding overly broad exception catches that could mask programming errors like SyntaxError or TypeError. The AutomataError class is raised when DOT file processing fails due to invalid format, I/O errors, or malformed automaton definitions. The main entry point catches this specific exception and provides a user-friendly error message to stderr before exiting. Also, replace generic exceptions raising in HA and LTL with AutomataError. Co-authored-by: Gabriele Monaco <gmonaco@redhat.com> Signed-off-by: Wander Lairson Costa <wander@redhat.com> Reviewed-by: Gabriele Monaco <gmonaco@redhat.com> Link: https://lore.kernel.org/r/20260223162407.147003-2-wander@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Diffstat (limited to 'rust/kernel/interop/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions