diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-06-22 21:40:20 +0200 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-06-22 21:40:20 +0200 |
commit | c5a4e881debcc75bdb96cdddd4abda10fd778b68 (patch) | |
tree | 9cb1bbb2510f0fce70d7ae36436bc22631698d84 /pyGHDL/cli | |
parent | ea328fa671fc42569a688c8dfb308d87f42771c3 (diff) | |
download | ghdl-c5a4e881debcc75bdb96cdddd4abda10fd778b68.tar.gz ghdl-c5a4e881debcc75bdb96cdddd4abda10fd778b68.tar.bz2 ghdl-c5a4e881debcc75bdb96cdddd4abda10fd778b68.zip |
Improved error handling.
Diffstat (limited to 'pyGHDL/cli')
-rwxr-xr-x | pyGHDL/cli/DOM.py | 6 |
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) |