Skip to content

Commit b155555

Browse files
author
Mike Solomon
authored
Update Exception.py
1 parent 7568c5b commit b155555

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

python-ffi/Effect/Exception.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22

33

44
def showErrorImpl(err):
5-
# TODO: make sure implemeted as JS
6-
result = traceback.extract_stack(err)
7-
if result is None:
5+
try:
6+
# TODO: make sure implemeted as JS
7+
result = traceback.extract_stack(err)
8+
if result is None:
9+
return str(err)
10+
else:
11+
return result
12+
except Exception as e:
13+
# TODO: sometimes we don't get a viable `err`,
14+
# and that shouldn't penalize us
15+
# should we log this somehow?
816
return str(err)
9-
else:
10-
return result
11-
1217

1318
def error(msg):
1419
return Exception(msg)

0 commit comments

Comments
 (0)