15#ifndef TG_CONLLU_ERROR_HPP
16#define TG_CONLLU_ERROR_HPP 1
18#include <system_error>
171 [[nodiscard]]
constexpr const char*
name() const noexcept override;
178 [[nodiscard]] constexpr std::
string message(
int ev) const noexcept override;
185 [[nodiscard]] constexpr const
ErrorCategory& get_error_category() noexcept;
192 [[nodiscard]] constexpr std::error_code make_error_code(
ErrorCode ec) noexcept;
196struct std::is_error_code_enum<tg::conllu::
ErrorCode> : std::true_type {};
198#include "conllu/impl/error.ipp"
The std::error_category implementation backing tg::conllu::ErrorCode.
Definition error.hpp:165
constexpr std::string message(int ev) const noexcept override
Human-readable message for an ErrorCode value.
constexpr const char * name() const noexcept override
Name of the error category.
ErrorCode
Error codes reported by parsing, writing, and treebank mutation operations.
Definition error.hpp:25
@ PositionOutOfRange
A supplied index or position was out of range for the target container.
Definition error.hpp:43
@ SentenceNotFoundInTreebank
No sentence with the given identifier or pointer exists in the treebank.
Definition error.hpp:101
@ SentenceIdCannotBeRemoved
An attempt was made to remove the reserved sent_id metadata entry.
Definition error.hpp:97
@ InvalidNumberOfFields
A token's number of fields does not match what the treebank expects.
Definition error.hpp:134
@ DuplicateSentenceMetaEntry
The same metadata key was set more than once for a sentence.
Definition error.hpp:81
@ InvalidTokenHead
A HEAD value failed validation (e.g. self-reference or no matching token).
Definition error.hpp:126
@ InvalidWordFieldValue
A word line set a field it is not permitted to carry (only ID, FORM, MISC, and a Typo=Yes FEATS flag ...
Definition error.hpp:157
@ TokenFieldCountMismatch
A token line's number of fields does not match the treebank's column count.
Definition error.hpp:110
@ WordMustAppearBeforeToken
A word line appeared after one of the individual token lines it should span; word lines must precede ...
Definition error.hpp:152
@ Success
No error.
Definition error.hpp:29
@ TokenEmptyNodeMismatch
An empty node's identifier is inconsistent with its parent token.
Definition error.hpp:118
@ StreamError
Reading from or writing to the underlying stream failed (e.g. an exception was thrown while buffering...
Definition error.hpp:35
@ NodeNotFoundInToken
No empty node with the given identifier or pointer exists on the token.
Definition error.hpp:122
@ DuplicateColumnName
A column with the given name already exists in the treebank.
Definition error.hpp:60
@ InvalidSentenceId
A sentence identifier failed validation.
Definition error.hpp:89
@ InvalidPointer
A required pointer argument was null, or did not belong to the expected owner.
Definition error.hpp:47
@ InvalidColumnName
A column name failed validation (e.g. empty or containing disallowed characters).
Definition error.hpp:56
@ DuplicateSentenceId
A sentence with the given identifier already exists in the treebank.
Definition error.hpp:93
@ SentenceMustStartWithMetaLine
The first line of a sentence block was not a #-prefixed meta line.
Definition error.hpp:69
@ WordNotFoundInSentence
No word with the given pointer exists in the sentence.
Definition error.hpp:147
@ TokenNotFoundInSentence
No token with the given identifier or pointer exists in the sentence.
Definition error.hpp:130
@ InvalidTokenId
A token identifier (ID field) failed validation.
Definition error.hpp:106
@ ImmutableTokenField
An attempt was made to modify a field that cannot be set directly (e.g. ID).
Definition error.hpp:114
@ InvalidWordRange
A word's token range is malformed or out of bounds for its sentence.
Definition error.hpp:139
@ InvalidSentenceMetaKey
An empty metadata key was supplied.
Definition error.hpp:77
@ InvalidColumnsLine
Reserved for a malformed column declaration line.
Definition error.hpp:52
@ MissingSentenceId
A sentence block had no sent_id meta line.
Definition error.hpp:85
@ OverlappingWordRange
A word's token range overlaps another word's range in the same sentence.
Definition error.hpp:143
@ InvalidSentenceMetaLine
A #-prefixed meta line is not a comment line (does not start with #).
Definition error.hpp:73
@ InsufficientMemory
An allocation failed (e.g. while growing a container or copying a string).
Definition error.hpp:39
@ ColumnNotFound
No column with the given name or position exists.
Definition error.hpp:64