@@ -13,7 +13,7 @@ from cpython cimport (PyObject, PyBytes_FromString,
1313 PyUnicode_Check, PyUnicode_AsUTF8String,
1414 PyErr_Occurred, PyErr_Fetch)
1515from cpython.ref cimport PyObject, Py_XDECREF
16- from io.common import CParserError , DtypeWarning, EmptyDataError
16+ from io.common import ParserError , DtypeWarning, EmptyDataError
1717
1818
1919cdef extern from " Python.h" :
@@ -719,7 +719,7 @@ cdef class TextReader:
719719 if isinstance (msg, list ):
720720 msg = " [%s ], len of %d ," % (
721721 ' ,' .join([ str (m) for m in msg ]), len (msg))
722- raise CParserError (
722+ raise ParserError (
723723 ' Passed header=%s but only %d lines in file'
724724 % (msg, self .parser.lines))
725725
@@ -812,7 +812,7 @@ cdef class TextReader:
812812 passed_count = len (header[0 ])
813813
814814 # if passed_count > field_count:
815- # raise CParserError ('Column names have %d fields, '
815+ # raise ParserError ('Column names have %d fields, '
816816 # 'data has %d fields'
817817 # % (passed_count, field_count))
818818
@@ -1004,7 +1004,7 @@ cdef class TextReader:
10041004 (num_cols >= self .parser.line_fields[i]) * num_cols
10051005
10061006 if self .table_width - self .leading_cols > num_cols:
1007- raise CParserError (
1007+ raise ParserError (
10081008 " Too many columns specified: expected %s and found %s " %
10091009 (self .table_width - self .leading_cols, num_cols))
10101010
@@ -1059,7 +1059,7 @@ cdef class TextReader:
10591059 self .use_unsigned)
10601060
10611061 if col_res is None :
1062- raise CParserError (' Unable to parse column %d ' % i)
1062+ raise ParserError (' Unable to parse column %d ' % i)
10631063
10641064 results[i] = col_res
10651065
@@ -1310,7 +1310,7 @@ def _is_file_like(obj):
13101310 if PY3:
13111311 import io
13121312 if isinstance (obj, io.TextIOWrapper):
1313- raise CParserError (' Cannot handle open unicode files (yet)' )
1313+ raise ParserError (' Cannot handle open unicode files (yet)' )
13141314
13151315 # BufferedReader is a byte reader for Python 3
13161316 file = io.BufferedReader
@@ -2015,7 +2015,7 @@ cdef raise_parser_error(object base, parser_t *parser):
20152015 else :
20162016 message += ' no error message set'
20172017
2018- raise CParserError (message)
2018+ raise ParserError (message)
20192019
20202020
20212021def _concatenate_chunks (list chunks ):
0 commit comments