diff options
author | 2018-07-13 04:51:48 -0700 | |
---|---|---|
committer | 2018-07-13 04:54:48 -0700 | |
commit | 895a7667884545a68480eb91916a5a23c2852308 (patch) | |
tree | 9015ecb82a3a244e004489bfcc5dd31faf7416fc /tensorflow/python/util | |
parent | e438b192d27f2881e9c627166d73a4fdafcfeb7d (diff) |
Add initial support for interpolating filename and line number in error messages returned from C++.
PiperOrigin-RevId: 204455158
Diffstat (limited to 'tensorflow/python/util')
-rw-r--r-- | tensorflow/python/util/tf_stack.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/python/util/tf_stack.py b/tensorflow/python/util/tf_stack.py index dacc1ce83e..fe4f4a63eb 100644 --- a/tensorflow/python/util/tf_stack.py +++ b/tensorflow/python/util/tf_stack.py @@ -21,6 +21,12 @@ from __future__ import print_function import linecache import sys +# Names for indices into TF traceback tuples. +TB_FILENAME = 0 +TB_LINENO = 1 +TB_FUNCNAME = 2 +TB_CODEDICT = 3 # Dictionary of Python interpreter state. + def extract_stack(extract_frame_info_fn=None): """A lightweight, extensible re-implementation of traceback.extract_stack. |