diff options
author | Benedikt Tutzer <e1225461@student.tuwien.ac.at> | 2019-04-03 12:21:56 +0200 |
---|---|---|
committer | Benedikt Tutzer <e1225461@student.tuwien.ac.at> | 2019-04-03 12:21:56 +0200 |
commit | bbfb43006d2a7d67d06ee151a1b8ad05ec5b1750 (patch) | |
tree | 0b0d599c429f1bc65702e2bc10be04d215ba6a83 /passes/cmds/plugin.cc | |
parent | 0774a500d4a03104787e6514c69ff4995633a65f (diff) | |
download | yosys-bbfb43006d2a7d67d06ee151a1b8ad05ec5b1750.tar.gz yosys-bbfb43006d2a7d67d06ee151a1b8ad05ec5b1750.tar.bz2 yosys-bbfb43006d2a7d67d06ee151a1b8ad05ec5b1750.zip |
Improved Error reporting when Python passes are loaded
Diffstat (limited to 'passes/cmds/plugin.cc')
-rw-r--r-- | passes/cmds/plugin.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/passes/cmds/plugin.cc b/passes/cmds/plugin.cc index 2b06690f9..bb1ec8716 100644 --- a/passes/cmds/plugin.cc +++ b/passes/cmds/plugin.cc @@ -61,12 +61,14 @@ void load_plugin(std::string filename, std::vector<std::string> aliases) PyObject *filename_p = PyUnicode_FromString(filename.c_str()); if(filename_p == NULL) { + PyErr_Print(); log_cmd_error("Issues converting `%s' to Python\n", filename.c_str()); return; } PyObject *module_p = PyImport_Import(filename_p); if(module_p == NULL) { + PyErr_Print(); log_cmd_error("Can't load python module `%s'\n", filename.c_str()); return; } |