Commit 4078ecd4 authored by Yong Tang's avatar Yong Tang Committed by Rasmus Munk Larsen
Browse files

Improve profiler error message when graph_path is not available. (#16463)



This fix tries to address the issue raised in 16451 to provide
a better error message when graph_path is not available for profiler.

Previously if graph_path is not available, the process will crash
with not very imformative message and a core dump:
```
2018-01-26 01:43:29.458032: F tensorflow/core/profiler/profiler.cc:206] Non-OK-status: ReadProtoFile(Env::Default(), FLAGS_graph_path, graph.get(), false) status: Not found: ; No such file or directory
Aborted (core dumped)
```

With this fix, the error message is improved to:
```
Failed to read graph_path: Invalid argument: Cannot parse proto file.
```
and the process exit with 1.

This fix fixes 16451.

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>
parent d623b824
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment