Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c7753b0 authored by Myles Watson's avatar Myles Watson
Browse files

PDL: Replace abort() calls with ERROR()

Test: bluetooth_packet_parser_test
Change-Id: Ifd49de597dfdc91cd8f35a40ede6b2c90b352127
parent 2085b0f7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -90,9 +90,8 @@ void PacketDef::GenParserFieldGetter(std::ostream& s, const PacketField* field)
  auto end_field_offset = GetOffsetForField(field->GetName(), true);

  if (start_field_offset.empty() && end_field_offset.empty()) {
    std::cerr << "Field location for " << field->GetName() << " is ambiguous, "
    ERROR(field) << "Field location for " << field->GetName() << " is ambiguous, "
                 << "no method exists to determine field location from begin() or end().\n";
    abort();
  }

  field->GenGetter(s, start_field_offset, end_field_offset);
+1 −2
Original line number Diff line number Diff line
@@ -98,8 +98,7 @@ void ParentDef::AssignSizeFields() {

    // If we've reached this point then the field wasn't a variable length field.
    // Check to see if the field is a variable length field
    std::cerr << "Can not use size/count in reference to a fixed size field.\n";
    abort();
    ERROR(field, size_field) << "Can not use size/count in reference to a fixed size field.\n";
  }
}