Vince's CSV Parser
Loading...
Searching...
No Matches
fwd.hpp
1#pragma once
2#include "../csv_exceptions.hpp"
3
4namespace csv {
5 template<typename KeyType>
6 class DataFrame;
7 template<typename KeyType>
8 class DataFrameColumn;
9 template<typename KeyType>
10 class DataFrameRow;
11}
12
13#if CSV_EXCEPTIONS_ENABLED
14namespace csv { namespace internals {
15 inline void throw_dataframe_error(const CSVError& error) {
16 switch (error.code) {
18 return;
20 if (error.context == CSV_ERROR_INDEX_OUT_OF_BOUNDS) break;
21 throw std::out_of_range(std::string(error.context));
24 throw std::out_of_range(std::string(error.context));
25 default:
26 break;
27 }
28 throw_error(error);
29 }
30}}
31#endif
void throw_error(const CSVError &error)
Translate explicit library failures while preserving legacy exception categories.
The all encompassing namespace.
@ IndexOutOfBounds
A row/column position exceeds the visible schema or physical record width.
@ None
Success, including end-of-stream without a row.
@ KeyNotFound
A requested row key is absent from the frame's key index.
@ ColumnNotFound
A requested name is absent from the visible column schema.