AnCH Framework 0.2
Another C++ Hack: C++23 utility libraries
Loading...
Searching...
No Matches
csvError.hpp
1/*
2 ANCH Framework: ANother C++ Hack is a C++ framework based on C++23 standard
3 Copyright (C) 2026 Vincent Lachenal
4
5 This file is part of ANCH Framework.
6
7 ANCH Framework is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 ANCH Framework is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public License
18 along with ANCH Framework. If not, see <https://www.gnu.org/licenses/>.
19*/
20#pragma once
21
22#include "anch-csv-export.hpp"
23
24#include <cstddef>
25#include <stdexcept>
26#include <string>
27
28namespace anch::csv {
29
53
62 class ANCH_CSV_EXPORT CsvError: public std::runtime_error {
63
64 // Attributes +
65 private:
68
70 std::size_t _line;
71
73 std::size_t _column;
74 // Attributes -
75
76 // Constructors +
77 public:
86 CsvError(anch::csv::ErrorCode code, const std::string& message, std::size_t line, std::size_t column);
87 // Constructors -
88
89 // Accessors +
90 public:
97
103 std::size_t getLine() const noexcept;
104
110 std::size_t getColumn() const noexcept;
111 // Accessors -
112
113 };
114
115}
std::size_t getColumn() const noexcept
anch::csv::ErrorCode getErrorCode() const noexcept
std::size_t getLine() const noexcept
CsvError(anch::csv::ErrorCode code, const std::string &message, std::size_t line, std::size_t column)
AnCH CSV library namespace.
ErrorCode
Definition csvError.hpp:35
@ CONSTRAINT_VIOLATION
Definition csvError.hpp:51
@ INVALID_FORMAT
Definition csvError.hpp:38
@ UNKNOWN_COLUMN
Definition csvError.hpp:45
@ CONVERSION
Definition csvError.hpp:49
@ TOO_LARGE
Definition csvError.hpp:41
@ MISSING_COLUMN
Definition csvError.hpp:47
@ COLUMN_COUNT
Definition csvError.hpp:43