@@ -141,9 +141,9 @@ StructType::InitFieldByLowerCaseName(const StructType& self) {
141141}
142142
143143ListType::ListType (SchemaField element) : element_(std::move(element)) {
144- ICEBERG_CHECK (element_.name () == kElementName ,
145- " ListType: child field name should be '{}', was '{}'" , kElementName ,
146- element_.name ());
144+ ICEBERG_CHECK_OR_DIE (element_.name () == kElementName ,
145+ " ListType: child field name should be '{}', was '{}'" ,
146+ kElementName , element_.name ());
147147}
148148
149149ListType::ListType (int32_t field_id, std::shared_ptr<Type> type, bool optional)
@@ -200,12 +200,12 @@ bool ListType::Equals(const Type& other) const {
200200
201201MapType::MapType (SchemaField key, SchemaField value)
202202 : fields_{std::move (key), std::move (value)} {
203- ICEBERG_CHECK (this ->key ().name () == kKeyName ,
204- " MapType: key field name should be '{}', was '{}'" , kKeyName ,
205- this ->key ().name ());
206- ICEBERG_CHECK (this ->value ().name () == kValueName ,
207- " MapType: value field name should be '{}', was '{}'" , kValueName ,
208- this ->value ().name ());
203+ ICEBERG_CHECK_OR_DIE (this ->key ().name () == kKeyName ,
204+ " MapType: key field name should be '{}', was '{}'" , kKeyName ,
205+ this ->key ().name ());
206+ ICEBERG_CHECK_OR_DIE (this ->value ().name () == kValueName ,
207+ " MapType: value field name should be '{}', was '{}'" , kValueName ,
208+ this ->value ().name ());
209209}
210210
211211const SchemaField& MapType::key () const { return fields_[0 ]; }
@@ -292,8 +292,8 @@ bool DoubleType::Equals(const Type& other) const { return other.type_id() == kTy
292292
293293DecimalType::DecimalType (int32_t precision, int32_t scale)
294294 : precision_(precision), scale_(scale) {
295- ICEBERG_CHECK (precision >= 0 && precision <= kMaxPrecision ,
296- " DecimalType: precision must be in [0, 38], was {}" , precision);
295+ ICEBERG_CHECK_OR_DIE (precision >= 0 && precision <= kMaxPrecision ,
296+ " DecimalType: precision must be in [0, 38], was {}" , precision);
297297}
298298
299299int32_t DecimalType::precision () const { return precision_; }
@@ -341,7 +341,7 @@ std::string UuidType::ToString() const { return "uuid"; }
341341bool UuidType::Equals (const Type& other) const { return other.type_id () == kTypeId ; }
342342
343343FixedType::FixedType (int32_t length) : length_(length) {
344- ICEBERG_CHECK (length >= 0 , " FixedType: length must be >= 0, was {}" , length);
344+ ICEBERG_CHECK_OR_DIE (length >= 0 , " FixedType: length must be >= 0, was {}" , length);
345345}
346346
347347int32_t FixedType::length () const { return length_; }
0 commit comments