From: Benedikt Tutzer Date: Wed, 3 Apr 2019 10:21:56 +0000 (+0200) Subject: Improved Error reporting when Python passes are loaded X-Git-Tag: yosys-0.9~179^2~10 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbfb43006d2a7d67d06ee151a1b8ad05ec5b1750;p=yosys.git Improved Error reporting when Python passes are loaded --- 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 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; }