You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a diagnostic error message when a filesystem scheme is not found. (#21816)
Example old message:
panic: file system scheme "default" not registered
Example new message:
panic: file system scheme "default" not registered for "/tmp/fake.txt": Consider adding the following import to your program to register an implementation for "default":
import _ "github.com/apache/beam/sdks/v2/go/pkg/beam/io/filesystem/local"
ifsuggestedImportPath, ok:=wellKnownSchemeImportPaths[scheme]; ok {
68
+
messageSuffix=fmt.Sprintf(": Consider adding the following import to your program to register an implementation for %q:\n import _ %q", scheme, suggestedImportPath)
69
+
}
70
+
returnerrors.Errorf("file system scheme %q not registered for %q%s", scheme, path, messageSuffix)
71
+
}
72
+
57
73
// Interface is a filesystem abstraction that allows beam io sources and sinks
58
74
// to use various underlying storage systems transparently.
0 commit comments