@@ -13,7 +13,7 @@ from cpython cimport (PyObject, PyBytes_FromString,
13
13
PyUnicode_Check, PyUnicode_AsUTF8String,
14
14
PyErr_Occurred, PyErr_Fetch)
15
15
from cpython.ref cimport PyObject, Py_XDECREF
16
- from io.common import CParserError , DtypeWarning, EmptyDataError
16
+ from io.common import ParserError , DtypeWarning, EmptyDataError
17
17
18
18
19
19
cdef extern from " Python.h" :
@@ -720,7 +720,7 @@ cdef class TextReader:
720
720
if isinstance (msg, list ):
721
721
msg = " [%s ], len of %d ," % (
722
722
' ,' .join([ str (m) for m in msg ]), len (msg))
723
- raise CParserError (
723
+ raise ParserError (
724
724
' Passed header=%s but only %d lines in file'
725
725
% (msg, self .parser.lines))
726
726
@@ -813,7 +813,7 @@ cdef class TextReader:
813
813
passed_count = len (header[0 ])
814
814
815
815
# if passed_count > field_count:
816
- # raise CParserError ('Column names have %d fields, '
816
+ # raise ParserError ('Column names have %d fields, '
817
817
# 'data has %d fields'
818
818
# % (passed_count, field_count))
819
819
@@ -1005,7 +1005,7 @@ cdef class TextReader:
1005
1005
(num_cols >= self .parser.line_fields[i]) * num_cols
1006
1006
1007
1007
if self .table_width - self .leading_cols > num_cols:
1008
- raise CParserError (
1008
+ raise ParserError (
1009
1009
" Too many columns specified: expected %s and found %s " %
1010
1010
(self .table_width - self .leading_cols, num_cols))
1011
1011
@@ -1060,7 +1060,7 @@ cdef class TextReader:
1060
1060
self .use_unsigned)
1061
1061
1062
1062
if col_res is None :
1063
- raise CParserError (' Unable to parse column %d ' % i)
1063
+ raise ParserError (' Unable to parse column %d ' % i)
1064
1064
1065
1065
results[i] = col_res
1066
1066
@@ -1311,7 +1311,7 @@ def _is_file_like(obj):
1311
1311
if PY3:
1312
1312
import io
1313
1313
if isinstance (obj, io.TextIOWrapper):
1314
- raise CParserError (' Cannot handle open unicode files (yet)' )
1314
+ raise ParserError (' Cannot handle open unicode files (yet)' )
1315
1315
1316
1316
# BufferedReader is a byte reader for Python 3
1317
1317
file = io.BufferedReader
@@ -2016,7 +2016,7 @@ cdef raise_parser_error(object base, parser_t *parser):
2016
2016
else :
2017
2017
message += ' no error message set'
2018
2018
2019
- raise CParserError (message)
2019
+ raise ParserError (message)
2020
2020
2021
2021
2022
2022
def _concatenate_chunks (list chunks ):
0 commit comments