Skip to content

Conversation

@Thorium
Copy link
Contributor

@Thorium Thorium commented Nov 21, 2023

mkFirstLineOfFile is often called with non-existing temp-fsx script file, causing "file not found" exception,
then just to be caught by the try-with in the method.

Exceptions should happen on technical reasons, not as a part of a business workflow.

So it'd be better to check if file exists before trying to open it.

@Thorium Thorium requested a review from a team as a code owner November 21, 2023 09:25
@vzarytovskii vzarytovskii enabled auto-merge (squash) November 21, 2023 13:00
Copy link
Contributor

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff. Yeah we shouldn't use exception for the flow control. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants