Changeset 11c46c8


Ignore:
Timestamp:
Mar 26, 2019, 3:22:37 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/crepe, feature/crepe_org, feature/timestretch, fix/ffmpeg5, master
Children:
841ceed
Parents:
8bfef30
Message:

[py] digital_filter.set_* raise ValueError? (see #gh-241)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/py-filter.c

    r8bfef30 r11c46c8  
    160160      PyErr_SetString (PyExc_ValueError,
    161161          "error when setting filter to C-weighting");
     162    } else {
     163      // change the RuntimeError into ValueError
     164      PyObject *type, *value, *traceback;
     165      PyErr_Fetch(&type, &value, &traceback);
     166      PyErr_Restore(PyExc_ValueError, value, traceback);
    162167    }
    163168    return NULL;
     
    180185      PyErr_SetString (PyExc_ValueError,
    181186          "error when setting filter to A-weighting");
     187    } else {
     188      // change the RuntimeError into ValueError
     189      PyObject *type, *value, *traceback;
     190      PyErr_Fetch(&type, &value, &traceback);
     191      PyErr_Restore(PyExc_ValueError, value, traceback);
    182192    }
    183193    return NULL;
     
    200210      PyErr_SetString (PyExc_ValueError,
    201211          "error when setting filter with biquad coefficients");
     212    } else {
     213      // change the RuntimeError into ValueError
     214      PyObject *type, *value, *traceback;
     215      PyErr_Fetch(&type, &value, &traceback);
     216      PyErr_Restore(PyExc_ValueError, value, traceback);
    202217    }
    203218    return NULL;
Note: See TracChangeset for help on using the changeset viewer.