@@ -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" :
@@ -719,7 +719,7 @@ cdef class TextReader:
719
719
if isinstance (msg, list ):
720
720
msg = " [%s ], len of %d ," % (
721
721
' ,' .join([ str (m) for m in msg ]), len (msg))
722
- raise CParserError (
722
+ raise ParserError (
723
723
' Passed header=%s but only %d lines in file'
724
724
% (msg, self .parser.lines))
725
725
@@ -812,7 +812,7 @@ cdef class TextReader:
812
812
passed_count = len (header[0 ])
813
813
814
814
# if passed_count > field_count:
815
- # raise CParserError ('Column names have %d fields, '
815
+ # raise ParserError ('Column names have %d fields, '
816
816
# 'data has %d fields'
817
817
# % (passed_count, field_count))
818
818
@@ -1004,7 +1004,7 @@ cdef class TextReader:
1004
1004
(num_cols >= self .parser.line_fields[i]) * num_cols
1005
1005
1006
1006
if self .table_width - self .leading_cols > num_cols:
1007
- raise CParserError (
1007
+ raise ParserError (
1008
1008
" Too many columns specified: expected %s and found %s " %
1009
1009
(self .table_width - self .leading_cols, num_cols))
1010
1010
@@ -1059,7 +1059,7 @@ cdef class TextReader:
1059
1059
self .use_unsigned)
1060
1060
1061
1061
if col_res is None :
1062
- raise CParserError (' Unable to parse column %d ' % i)
1062
+ raise ParserError (' Unable to parse column %d ' % i)
1063
1063
1064
1064
results[i] = col_res
1065
1065
@@ -1310,7 +1310,7 @@ def _is_file_like(obj):
1310
1310
if PY3:
1311
1311
import io
1312
1312
if isinstance (obj, io.TextIOWrapper):
1313
- raise CParserError (' Cannot handle open unicode files (yet)' )
1313
+ raise ParserError (' Cannot handle open unicode files (yet)' )
1314
1314
1315
1315
# BufferedReader is a byte reader for Python 3
1316
1316
file = io.BufferedReader
@@ -2015,7 +2015,7 @@ cdef raise_parser_error(object base, parser_t *parser):
2015
2015
else :
2016
2016
message += ' no error message set'
2017
2017
2018
- raise CParserError (message)
2018
+ raise ParserError (message)
2019
2019
2020
2020
2021
2021
def _concatenate_chunks (list chunks ):
0 commit comments