Changeset 9b23815e


Ignore:
Timestamp:
Oct 30, 2018, 1:19:53 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
07382d8
Parents:
4bc10e2
Message:

[py] use aubio_log message when set by failed aubio_<>_set_<>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/gen_code.py

    r4bc10e2 r9b23815e  
    481481
    482482  if (err > 0) {{
    483     PyErr_SetString (PyExc_ValueError, "error running aubio_{shortname}_set_{param}");
     483    if (PyErr_Occurred() == NULL) {{
     484      PyErr_SetString (PyExc_ValueError, "error running aubio_{shortname}_set_{param}");
     485    }} else {{
     486      // change the RuntimeError into ValueError
     487      PyObject *type, *value, *traceback;
     488      PyErr_Fetch(&type, &value, &traceback);
     489      PyErr_Restore(PyExc_ValueError, value, traceback);
     490    }}
    484491    return NULL;
    485492  }}
Note: See TracChangeset for help on using the changeset viewer.