Changeset ac7e49b for python/ext


Ignore:
Timestamp:
Nov 26, 2015, 2:48:06 PM (9 years ago)
Author:
Nils Philippsen <nils@tiptoe.de>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
b8ed85e
Parents:
770b9e7
git-author:
Nils Philippsen <nils@tiptoe.de> (11/26/15 00:57:19)
git-committer:
Nils Philippsen <nils@tiptoe.de> (11/26/15 14:48:06)
Message:

Python 3: raise RuntimeErrors?, not generic exceptions

Location:
python/ext
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • python/ext/aubiowraphell.h

    r770b9e7 rac7e49b  
    1414  self->o = new_aubio_## NAME ( PARAMS ); \
    1515  if (self->o == NULL) { \
    16     PyErr_SetString (PyExc_StandardError, "error creating object"); \
     16    PyErr_SetString (PyExc_RuntimeError, "error creating object"); \
    1717    return -1; \
    1818  } \
  • python/ext/py-sink.c

    r770b9e7 rac7e49b  
    116116  }
    117117  if (self->o == NULL) {
    118     PyErr_SetString (PyExc_StandardError, "error creating sink with this uri");
     118    PyErr_SetString (PyExc_RuntimeError, "error creating sink with this uri");
    119119    return -1;
    120120  }
  • python/ext/py-source.c

    r770b9e7 rac7e49b  
    138138    char_t errstr[30 + strlen(self->uri)];
    139139    sprintf(errstr, "error creating source with %s", self->uri);
    140     PyErr_SetString (PyExc_StandardError, errstr);
     140    PyErr_SetString (PyExc_RuntimeError, errstr);
    141141    return -1;
    142142  }
Note: See TracChangeset for help on using the changeset viewer.