Wander Lairson Costa <[email protected]> writes: > Remove bare except clauses from the generator module that were > catching all exceptions including KeyboardInterrupt and SystemExit. > This follows the same exception handling improvements made in the > previous AutomataError commit and addresses PEP 8 violations. > > The bare except clause in __create_directory was silently catching > and ignoring all errors after printing a message, which could mask > serious issues. For __write_file, the bare except created a critical > bug where the file variable could remain undefined if open() failed, > causing a NameError when attempting to write to or close the file. > > These methods now let OSError propagate naturally, allowing callers > to handle file system errors appropriately. This provides clearer > error reporting and allows Python's exception handling to show > complete stack traces with proper error types and locations. > > Signed-off-by: Wander Lairson Costa <[email protected]>
Reviewed-by: Nam Cao <[email protected]>
