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/libghdl | |
parent | ea328fa671fc42569a688c8dfb308d87f42771c3 (diff) | |
download | ghdl-c5a4e881debcc75bdb96cdddd4abda10fd778b68.tar.gz ghdl-c5a4e881debcc75bdb96cdddd4abda10fd778b68.tar.bz2 ghdl-c5a4e881debcc75bdb96cdddd4abda10fd778b68.zip |
Improved error handling.
Diffstat (limited to 'pyGHDL/libghdl')
-rw-r--r-- | pyGHDL/libghdl/__init__.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pyGHDL/libghdl/__init__.py b/pyGHDL/libghdl/__init__.py index 0d3c75fa1..525710590 100644 --- a/pyGHDL/libghdl/__init__.py +++ b/pyGHDL/libghdl/__init__.py @@ -37,6 +37,7 @@ import os import sys from pathlib import Path from shutil import which +from typing import List from pydecor import export @@ -48,7 +49,15 @@ from pyGHDL.libghdl.version import __version__ class LibGHDLException(GHDLBaseException): - pass + _internalErrors: List[str] + + def __init__(self, message: str, errors: List[str]): + super().__init__(message) + self._internalErrors = errors + + @property + def InternalErrors(self): + return self._internalErrors def _get_libghdl_name() -> Path: |