X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=exception.c;h=a67600fa4f50a87eaba3667bcdb7e4b004040627;hp=aa7ab616d58df4a949e8cf0c814ca06118c9a73a;hb=c9bfccc6347e05e6faba6f27fe0e50a7d55f531c;hpb=41106a07486f46de5dac2fd55233691172d4fe59;ds=sidebyside diff --git a/exception.c b/exception.c index aa7ab61..a67600f 100644 --- a/exception.c +++ b/exception.c @@ -24,7 +24,6 @@ #include #include /* Python header not pulled in by default. */ - void catch_exception(const char *format, ...) { PyObject *etype, *evalue, *etb, *py_str; @@ -70,8 +69,9 @@ void catch_exception(const char *format, ...) tracestr = NULL; py_tb = (PyTracebackObject *) etb; py_str = PyUnicode_FromFormat("%U:%d in %U", - py_tb->tb_frame->f_code->co_filename, py_tb->tb_frame->f_lineno, - py_tb->tb_frame->f_code->co_name); + py_tb->tb_frame->f_code->co_filename, + py_tb->tb_frame->f_lineno, + py_tb->tb_frame->f_code->co_name); py_str_as_str(py_str, &tracestr); Py_DecRef(py_str); g_string_printf(msg, "%s in %s: %s", ename, tracestr, str); @@ -87,8 +87,4 @@ void catch_exception(const char *format, ...) /* Just in case. */ PyErr_Clear(); - - return; } - -