Add a debug message when offset overflow resolution fails.
diff --git a/src/hb-repacker.hh b/src/hb-repacker.hh
index 2370338..cbab791 100644
--- a/src/hb-repacker.hh
+++ b/src/hb-repacker.hh
@@ -430,9 +430,13 @@
     update_incoming_edge_count ();
     for (const auto& o : overflows)
     {
+      const auto& parent = vertices_[o.parent];
       const auto& child = vertices_[o.child];
-      DEBUG_MSG (SUBSET_REPACK, nullptr, "  overflow from %d => %d (%d incoming , %d outgoing)",
+      DEBUG_MSG (SUBSET_REPACK, nullptr,
+                 "  overflow from %d (%d in, %d out) => %d (%d in, %d out)",
                  o.parent,
+                 parent.incoming_edges,
+                 parent.obj.links.length,
                  o.child,
                  child.incoming_edges,
                  child.obj.links.length);
@@ -762,6 +766,13 @@
     c->err (HB_SERIALIZE_ERROR_OTHER);
     return;
   }
+
+  if (sorted_graph.will_overflow ())
+  {
+    c->err (HB_SERIALIZE_ERROR_OFFSET_OVERFLOW);
+    DEBUG_MSG (SUBSET_REPACK, nullptr, "Offset overflow resolution failed.");
+    return;
+  }
   sorted_graph.serialize (c);
 }