Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Error Message for Invalid Source Path #1102

Closed
Shion1305 opened this issue Jun 5, 2024 · 0 comments
Closed

Improve Error Message for Invalid Source Path #1102

Shion1305 opened this issue Jun 5, 2024 · 0 comments

Comments

@Shion1305
Copy link
Contributor

Is your feature request related to a problem? Please describe.

If I specify an invalid file path for migrate.New as the source path, the error message will look like this.

.: The system cannot find the path specified.

The error message does not contain a source path, so it is hard to determine the error from this message.
Path . comes from a hard-coded part as follows, so the error does not provide a valuable message.

if err := nf.Init(os.DirFS(p), "."); err != nil {
return nil, err
}
return nf, nil

It would be better if the error message contained a specified source path or if the error message said the source path was wrong.

@dhui dhui closed this as completed in cabb2db Jun 10, 2024
dhui added a commit that referenced this issue Jun 10, 2024
🧑‍💻 improve error message for invalid source, database, resolves: #1102
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

No branches or pull requests

1 participant