aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/platform/env.cc
diff options
context:
space:
mode:
authorGravatar Brennan Saeta <saeta@google.com>2018-01-17 17:07:11 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-01-17 17:12:57 -0800
commit753d43dc816c7b541a081318acdc9eb8e17621e6 (patch)
tree14f504a30bed3b3d741df80d4df0b4843adc0efb /tensorflow/core/platform/env.cc
parentca8df263ff350df8b5f32dd82fcffe0887b64ac5 (diff)
Nicer error messages when missing filesystem.
PiperOrigin-RevId: 182293612
Diffstat (limited to 'tensorflow/core/platform/env.cc')
-rw-r--r--tensorflow/core/platform/env.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/tensorflow/core/platform/env.cc b/tensorflow/core/platform/env.cc
index d617ff10c8..1bcca1243f 100644
--- a/tensorflow/core/platform/env.cc
+++ b/tensorflow/core/platform/env.cc
@@ -92,8 +92,12 @@ Status Env::GetFileSystemForFile(const string& fname, FileSystem** result) {
io::ParseURI(fname, &scheme, &host, &path);
FileSystem* file_system = file_system_registry_->Lookup(scheme.ToString());
if (!file_system) {
- return errors::Unimplemented("File system scheme ", scheme,
- " not implemented");
+ if (scheme.empty()) {
+ scheme = "[local]";
+ }
+
+ return errors::Unimplemented("File system scheme '", scheme,
+ "' not implemented (file: '", fname, "')");
}
*result = file_system;
return Status::OK();
@@ -173,8 +177,8 @@ bool Env::FilesExist(const std::vector<string>& files,
if (!file_system) {
fs_result = false;
if (fs_status) {
- Status s = errors::Unimplemented("File system scheme ", itr.first,
- " not implemented");
+ Status s = errors::Unimplemented("File system scheme '", itr.first,
+ "' not implemented");
local_status.resize(itr.second.size(), s);
}
} else {