move exception class into shadow function as we may not want to export it under the cython.* namespace at this point