projects
/
pytorch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88302d2
)
Now also catch ValueError.
author
François Fleuret
<francois@fleuret.org>
Thu, 8 Dec 2022 16:30:52 +0000
(17:30 +0100)
committer
François Fleuret
<francois@fleuret.org>
Thu, 8 Dec 2022 16:30:52 +0000
(17:30 +0100)
tensorstack.py
patch
|
blob
|
history
diff --git
a/tensorstack.py
b/tensorstack.py
index
8360f9b
..
d7b0d89
100755
(executable)
--- a/
tensorstack.py
+++ b/
tensorstack.py
@@
-27,7
+27,7
@@
def exception_hook(exc_type, exc_value, tb):
print(f' File "{filename}", line {line_no}, in {name}')
print(open(filename, 'r').readlines()[line_no-1])
- if exc_type i
s RuntimeError
:
+ if exc_type i
n { RuntimeError, ValueError }
:
for n,v in tb.tb_frame.f_locals.items():
print(f' {n} -> {v}')