Skip to content

Commit 0409b0e

Browse files
Patrick Nguyentensorflower-gardener
authored andcommitted
Seal errors interface.
Change: 138332031
1 parent f45bb4e commit 0409b0e

6 files changed

Lines changed: 528 additions & 458 deletions

File tree

tensorflow/python/BUILD

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ py_library(
275275
name = "framework",
276276
srcs = [
277277
"framework/common_shapes.py",
278-
"framework/errors.py",
279278
"framework/framework_lib.py",
280279
"framework/graph_util.py",
281280
"framework/graph_util_impl.py",
@@ -290,14 +289,18 @@ py_library(
290289
srcs_version = "PY2AND3",
291290
deps = [
292291
":cpp_shape_inference_proto_py",
292+
":errors",
293293
":framework_for_generated_wrappers",
294294
":pywrap_tensorflow",
295295
],
296296
)
297297

298298
py_library(
299299
name = "errors",
300-
srcs = ["framework/errors.py"],
300+
srcs = [
301+
"framework/errors.py",
302+
"framework/errors_impl.py",
303+
],
301304
srcs_version = "PY2AND3",
302305
deps = [
303306
":util",

tensorflow/python/client/client_lib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
2626
@@get_default_session
2727
28-
## Error classes
28+
## Error classes and convenience functions
2929
3030
@@OpError
3131
@@CancelledError
@@ -44,6 +44,10 @@
4444
@@InternalError
4545
@@UnavailableError
4646
@@DataLossError
47+
48+
@@exception_type_from_error_code
49+
@@error_code_from_exception_type
50+
@@raise_exception_on_not_ok_status
4751
"""
4852

4953
from __future__ import absolute_import

0 commit comments

Comments
 (0)