37class SOURCEMETA_BLAZE_ALTERSCHEMA_EXPORT SchemaRuleInvalidNameError
38 :
public std::exception {
40 SchemaRuleInvalidNameError(
const std::string_view identifier,
42 : identifier_{identifier}, message_{message} {}
43 SchemaRuleInvalidNameError(
const std::string_view identifier,
44 std::string message) =
delete;
45 SchemaRuleInvalidNameError(
const std::string_view identifier,
46 std::string &&message) =
delete;
47 SchemaRuleInvalidNameError(
const std::string_view identifier,
48 std::string_view message) =
delete;
50 [[nodiscard]]
auto what()
const noexcept ->
const char *
override {
51 return this->message_;
54 [[nodiscard]]
auto identifier()
const noexcept ->
const std::string & {
55 return this->identifier_;
59 std::string identifier_;
66class SOURCEMETA_BLAZE_ALTERSCHEMA_EXPORT SchemaRuleInvalidNamePatternError
67 :
public std::exception {
69 SchemaRuleInvalidNamePatternError(
const std::string_view identifier,
70 const std::string_view regex)
71 : identifier_{identifier}, regex_{regex} {}
73 [[nodiscard]]
auto what()
const noexcept ->
const char *
override {
74 return "The schema rule name does not match the required pattern";
77 [[nodiscard]]
auto identifier()
const noexcept ->
const std::string & {
78 return this->identifier_;
81 [[nodiscard]]
auto regex()
const noexcept ->
const std::string & {
86 std::string identifier_;
92class SOURCEMETA_BLAZE_ALTERSCHEMA_EXPORT SchemaAbortError
93 :
public std::exception {
95 SchemaAbortError(
const char *message) : message_{message} {}
96 SchemaAbortError(std::string message) =
delete;
97 SchemaAbortError(std::string &&message) =
delete;
98 SchemaAbortError(std::string_view message) =
delete;
100 [[nodiscard]]
auto what()
const noexcept ->
const char *
override {
101 return this->message_;
105 const char *message_;
110class SOURCEMETA_BLAZE_ALTERSCHEMA_EXPORT SchemaBrokenReferenceError
111 :
public std::exception {
113 SchemaBrokenReferenceError(
const std::string_view identifier,
114 sourcemeta::core::Pointer schema_location,
116 : identifier_{identifier}, schema_location_{std::move(schema_location)},
119 [[nodiscard]]
auto what()
const noexcept ->
const char *
override {
120 return this->message_;
123 [[nodiscard]]
auto identifier()
const noexcept -> std::string_view {
124 return this->identifier_;
127 [[nodiscard]]
auto location()
const noexcept
128 ->
const sourcemeta::core::Pointer & {
129 return this->schema_location_;
133 std::string identifier_;
134 sourcemeta::core::Pointer schema_location_;
135 const char *message_;
140class SOURCEMETA_BLAZE_ALTERSCHEMA_EXPORT SchemaTransformRuleProcessedTwiceError
141 :
public std::exception {
143 SchemaTransformRuleProcessedTwiceError(
const std::string_view name,
144 sourcemeta::core::Pointer location)
145 : name_{name}, location_{std::move(location)} {}
147 [[nodiscard]]
auto what()
const noexcept ->
const char *
override {
148 return "Transformation rules must only be processed once";
151 [[nodiscard]]
auto name()
const noexcept -> std::string_view {
155 [[nodiscard]]
auto location()
const noexcept
156 ->
const sourcemeta::core::Pointer & {
157 return this->location_;
162 sourcemeta::core::Pointer location_;