Skip to content

Conversation

@salomvary
Copy link

  • Ignore hidden files
  • Print an error message with the migration file path if parsing fails for some reason

As error handling of the cli consists of printing the message of
exceptions populated to the main method, it is important to have useful
messages on these exceptions.

An example of such an exception is
`Source.fromInputStream(resource).getLines()` choking on files that can
not be parsed with text encoding (eg. binary swap files saved by Vim)
with the following message: "Input length = 1". There is no way to tell
what went wrong with which file.

This change will turn that useless error into something like this:
"Error parsing migration file migrations/.some-migration-file.cql.swp: Input length = 1"

Still not perfect but much better than before.
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.

1 participant