1010#include < string_view>
1111#include < type_traits>
1212
13- #include " ../Bytestring.hpp"
14- #include " ../Timestamp.hpp"
15- #include " ../Vectorstring.hpp"
1613#include " ../always_false.hpp"
1714#include " ../common.hpp"
1815#include " ../concepts.hpp"
1916#include " ../internal/is_literal.hpp"
20- #include " ../internal/is_validator.hpp"
21- #include " ../patterns.hpp"
2217
2318namespace rfl ::avro {
2419
@@ -140,7 +135,7 @@ class RFL_API Writer {
140135 avro_value_t new_value;
141136 int result = avro_value_append (&_parent->val_ , &new_value, nullptr );
142137 if (result != 0 ) {
143- throw std::runtime_error (std::string (__FUNCTION__) + " error(" +
138+ throw std::runtime_error (" Error adding value to array: error(" +
144139 std::to_string (result) +
145140 " ): " + avro_strerror ());
146141 }
@@ -155,7 +150,7 @@ class RFL_API Writer {
155150 int result = avro_value_add (&_parent->val_ , _name.data (), &new_value,
156151 nullptr , nullptr );
157152 if (result != 0 ) {
158- throw std::runtime_error (std::string (__FUNCTION__) + " error(" +
153+ throw std::runtime_error (" Error adding value to map: error(" +
159154 std::to_string (result) +
160155 " ): " + avro_strerror ());
161156 }
@@ -171,7 +166,7 @@ class RFL_API Writer {
171166 int result = avro_value_get_by_name (&_parent->val_ , _name.data (),
172167 &new_value, nullptr );
173168 if (result != 0 ) {
174- throw std::runtime_error (std::string (__FUNCTION__) + " error(" +
169+ throw std::runtime_error (" Error adding value to object: error(" +
175170 std::to_string (result) +
176171 " ): " + avro_strerror ());
177172 }
@@ -183,7 +178,7 @@ class RFL_API Writer {
183178 OutputVarType add_value_to_union (const size_t _index, const T& _var,
184179 OutputUnionType* _parent) const {
185180 if (_index > static_cast <size_t >(INT_MAX)) {
186- throw std::runtime_error (std::string (__FUNCTION__) + " index error" );
181+ throw std::runtime_error (" Error adding value to unions: Index error" );
187182 }
188183 avro_value_t new_value;
189184 int result = avro_value_set_branch (&_parent->val_ , static_cast <int >(_index),
0 commit comments