Qx v0.5.7
Qt Extensions Library
Loading...
Searching...
No Matches
Qx::DsvParseError Class Reference

The DsvParseError class is used to report errors while parsing an array of delimiter separated values. More...

#include <qx/core/qx-dsvtable.h>

Public Types

enum  ParseError {
  NoError ,
  IllegalEscape ,
  UnterminatedField ,
  UnevenColumns ,
  InternalError
}
 

Public Member Functions

 DsvParseError ()
 
 DsvParseError (ParseError error, qsizetype offset)
 
ParseError error () const
 
QString errorString () const
 
qsizetype offset () const
 

Detailed Description

See also
DsvTable.

Member Enumeration Documentation

◆ ParseError

This enum describes the type of error that occurred during the parsing of a DsvTable.

Enumerator
NoError 

No error occurred.

IllegalEscape 

Illegal use of an escape character.

UnterminatedField 

An escaped field was not properly terminated.

UnevenColumns 

A row contained a different number of fields than the header row.

InternalError 

An internal parser error occurred.

Constructor & Destructor Documentation

◆ DsvParseError() [1/2]

Qx::DsvParseError::DsvParseError ( )

Constructs a parse error report set to ParseError::NoError.

◆ DsvParseError() [2/2]

Qx::DsvParseError::DsvParseError ( ParseError error,
qsizetype offset )

Constructs a parse error report set to error, with offset offset.

Member Function Documentation

◆ error()

DsvParseError::ParseError Qx::DsvParseError::error ( ) const

Returns the type of parse error. Is equal to DsvParseError::NoError if the table was parsed correctly.

See also
ParseError and errorString().

◆ errorString()

QString Qx::DsvParseError::errorString ( ) const

Returns the human-readable message appropriate for the reported DsvTable parsing error.

◆ offset()

qsizetype Qx::DsvParseError::offset ( ) const

Returns the offset in the input string where the parse error occurred.


The documentation for this class was generated from the following files: