Skip to content

Improve Error Message for Invalid Source Path #1102

Closed
@Shion1305

Description

@Shion1305

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions