ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
fmtexceptions.hpp
Go to the documentation of this file.
1//==================================================================================================
2/// \file
3/// This header file is part of sub-namespace #alib::lang::format of module \alib_basecamp of
4/// the \aliblong.
5///
6/// \emoji :copyright: 2013-2024 A-Worx GmbH, Germany.
7/// Published under \ref mainpage_license "Boost Software License".
8//==================================================================================================
9#ifndef HPP_ALIB_LANG_FORMAT_EXCEPTIONS
10#define HPP_ALIB_LANG_FORMAT_EXCEPTIONS 1
11#pragma once
13
14namespace alib::lang::format {
15
16//==================================================================================================
17/// Enumeration of exceptions thrown with classes found in sub-namespace #alib::lang::format
18/// of module \alib_basecamp.
19//==================================================================================================
20enum class FMTExceptions
21{
22 /// Argument index '0' not allowed.
24
25 /// Argument index greater than number of arguments available.
27
28 /// Incompatible type code given argument type found.
30
31 // Formatter Python Style
32 /// Thrown by \alib{lang::format;FormatterPythonStyle;FormatterPythonStyle}:
33 /// Closing bracket <c>'}'</c> not found.
35
36 /// Thrown by \alib{lang::format;FormatterPythonStyle;FormatterPythonStyle}:
37 /// Missing precision integral value after <c>'.'</c> character.
39
40 /// Thrown by \alib{lang::format;FormatterPythonStyle;FormatterPythonStyle}:
41 /// Duplicate type code.
43
44 /// Thrown by \alib{lang::format;FormatterPythonStyle;FormatterPythonStyle}:
45 /// Unknown type code.
46 UnknownTypeCode =104,
47
48 /// Thrown by \alib{lang::format;FormatterPythonStyle;FormatterPythonStyle}:
49 /// Expected <c>'!'</c> not found.
51
52 /// Thrown by \alib{lang::format;FormatterPythonStyle;FormatterPythonStyle}:
53 /// Unknown conversion after <c>'!'</c>.
55
56 /// Thrown by \alib{lang::format;FormatterPythonStyle;FormatterPythonStyle}:
57 /// Precision specification not allowed with integer types.
59
60 /// Thrown by \alib{lang::format;FormatterPythonStyle;FormatterPythonStyle}:
61 /// Missing replacement strings after conversion <c>!Replace</c>.
63
64
65
66 // Formatter Java Style
67 /// Thrown by \alib{lang::format;FormatterJavaStyle;FormatterJavaStyle}:
68 /// Formatting of negative values in brackets is not supported.
70
71 /// Thrown by \alib{lang::format;FormatterJavaStyle;FormatterJavaStyle}:
72 /// Missing precision integral value after <c>'.'</c> character.
74
75 /// Thrown by \alib{lang::format;FormatterJavaStyle;FormatterJavaStyle}:
76 /// Output of floating point values in hexadecimal format not supported.
78
79 /// Thrown by \alib{lang::format;FormatterJavaStyle;FormatterJavaStyle}:
80 /// The alternate form '#' is not supported with given conversion.
82
83 /// Thrown by \alib{lang::format;FormatterJavaStyle;FormatterJavaStyle}:
84 /// Precision specification is not supported with given conversion.
86
87 /// Thrown by \alib{lang::format;FormatterJavaStyle;FormatterJavaStyle}:
88 /// Unknown conversion suffix with data/time conversion.
90
91 /// Thrown by \alib{lang::format;FormatterJavaStyle;FormatterJavaStyle}:
92 /// Unknown conversion character.
94
95
96 // PropertyFormatter and PropertyFormatters
97 /// Thrown by constructor of \alib{lang::format;PropertyFormatter}
98 /// when a property identifier parsed from the format string has no corresponding entry in the
99 /// \alib{lang::format;PropertyFormatter::TCallbackTable;TCallbackTable} provided.
101
102 /// Exception entry added in method \alib{lang::format;PropertyFormatter::Format}
103 /// when the underlying formatter throws.
105
106 /// Thrown by \alib{lang::format;PropertyFormatters::Format} if a configuration variable
107 /// cannot be loaded or is empty.
108 ///
109 /// \note To prevent this, software using this class should provide
110 /// \alib{lang::Camp;GetResourcePool;resourced} default values for each formatter variable.
112
113
114 // class Paragraphs
115 /// Thrown by \alib{lang::format;Paragraphs::AddMarked}
116 /// when an unknown marker token was found.
117 UnknownMarker =601,
118
119 /// Thrown by \alib{lang::format;Paragraphs::AddMarked}
120 /// when a property identifier parsed from the format string has no corresponding entry in the
121 /// \alib{lang::format;PropertyFormatter::TCallbackTable;TCallbackTable} provided.
123
124}; // FMTExceptions
125
126 } // namespace [alib::lang::format]
127
129
132
133#endif // HPP_ALIB_LANG_FORMAT_EXCEPTIONS
134
#define ALIB_ENUMS_ASSIGN_RECORD(TEnum, TRecord)
Definition records.hpp:712
#define ALIB_BOXING_VTABLE_DECLARE(TMapped, Identifier)
Definition vtable.inl:460
#define ALIB_RESOURCED_IN_MODULE(T, Camp, ResName)
@ ArgumentIndexOutOfBounds
Argument index greater than number of arguments available.
@ ArgumentIndexIs0
Argument index '0' not allowed.
@ IncompatibleTypeCode
Incompatible type code given argument type found.
lang::basecamp::BaseCamp BASECAMP
The singleton instance of ALib Camp class BaseCamp.
Definition basecamp.cpp:70