Skip to content

fix(franca_to_ifex): remove undefined log() call and dead code after raise - #163

Open
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/franca-to-ifex-log-nameserror
Open

fix(franca_to_ifex): remove undefined log() call and dead code after raise#163
SoundMatt wants to merge 1 commit into
COVESA:masterfrom
SoundMatt:fix/franca-to-ifex-log-nameserror

Conversation

@SoundMatt

Copy link
Copy Markdown
Contributor

The __main__ block has two bugs in its exception handlers:

  1. log("ERROR: File not found")log is not defined in this module, so a FileNotFoundError would immediately be followed by a NameError, hiding the real error. Replaced with print().

  2. raise(e) followed by log(...) — the log call is unreachable dead code. Simplified to a bare raise which also preserves the original traceback.

…raise

The `__main__` block called `log(...)` which is not defined in this
module, causing a `NameError` on FileNotFoundError.  Replace with
`print()`.  The dead-code `log(...)` after `raise(e)` in the general
except clause is also removed, and the bare `raise` form is used so
the original traceback is preserved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
@gunnar-mb

Copy link
Copy Markdown
Collaborator

Logging strategy and methods are currently a bit inconsistent. I will defer this one and aim for a more comprehensive overhaul of the logging strategy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants