aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/cli
diff options
context:
space:
mode:
authorPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-22 21:40:20 +0200
committerPatrick Lehmann <Patrick.Lehmann@plc2.de>2021-06-22 21:40:20 +0200
commitc5a4e881debcc75bdb96cdddd4abda10fd778b68 (patch)
tree9cb1bbb2510f0fce70d7ae36436bc22631698d84 /pyGHDL/cli
parentea328fa671fc42569a688c8dfb308d87f42771c3 (diff)
downloadghdl-c5a4e881debcc75bdb96cdddd4abda10fd778b68.tar.gz
ghdl-c5a4e881debcc75bdb96cdddd4abda10fd778b68.tar.bz2
ghdl-c5a4e881debcc75bdb96cdddd4abda10fd778b68.zip
Improved error handling.
Diffstat (limited to 'pyGHDL/cli')
-rwxr-xr-xpyGHDL/cli/DOM.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pyGHDL/cli/DOM.py b/pyGHDL/cli/DOM.py
index 641383686..68af8ec1a 100755
--- a/pyGHDL/cli/DOM.py
+++ b/pyGHDL/cli/DOM.py
@@ -48,9 +48,15 @@ def handleException(ex):
return 5
elif isinstance(ex, DOMException):
print("DOM:", ex)
+ ex2 = ex.__cause__
+ if ex2 is not None:
+ for message in ex2.InternalErrors:
+ print("libghdl: {message}".format(message=message))
return 4
elif isinstance(ex, LibGHDLException):
print("LIB:", ex)
+ for message in ex.InternalErrors:
+ print(" {message}".format(message=message))
return 3
elif isinstance(ex, GHDLBaseException):
print("GHDL:", ex)