dasmig-core 1.2.0
Shared random engine, distributions and data tiers for the dasmig generator libraries
Loading...
Searching...
No Matches
dasmig::core::tsv_error Class Reference

A data error with its location. More...

#include <tsv.hpp>

Inheritance diagram for dasmig::core::tsv_error:

Public Member Functions

 tsv_error (std::string source, std::size_t line, std::string column, const std::string &message)
 Construct.
 
const std::string & source () const noexcept
 The data source.
 
std::size_t line () const noexcept
 The line.
 
const std::string & column () const noexcept
 The column.
 

Detailed Description

A data error with its location.

what() reads ‘source:line: column 'name’: message`, leaving out the parts that do not apply.

Definition at line 58 of file tsv.hpp.

Constructor & Destructor Documentation

◆ tsv_error()

dasmig::core::tsv_error::tsv_error ( std::string  source,
std::size_t  line,
std::string  column,
const std::string &  message 
)
inline

Construct.

Parameters
sourceFile name or other description of the data.
line1-based line number, or 0 for the whole source.
columnColumn name, or empty for the whole line.
messageWhat is wrong.

Definition at line 66 of file tsv.hpp.

Member Function Documentation

◆ column()

const std::string & dasmig::core::tsv_error::column ( ) const
inlinenoexcept

The column.

Returns
Column name, or empty for the whole line.

Definition at line 83 of file tsv.hpp.

◆ line()

std::size_t dasmig::core::tsv_error::line ( ) const
inlinenoexcept

The line.

Returns
1-based line, or 0 for the whole source.

Definition at line 79 of file tsv.hpp.

◆ source()

const std::string & dasmig::core::tsv_error::source ( ) const
inlinenoexcept

The data source.

Returns
File name or description.

Definition at line 75 of file tsv.hpp.


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