+static void score_error_vfmt(struct score *score, const char *source,
+ const char *errorfmt, va_list ap)
+{
+
+ if (!score->error)
+ score->error = tal_strdup(score, "");
+
+ if (verbose < 2 && strcount(score->error, "\n") > 5) {
+ if (!strends(score->error,
+ "... more (use -vv to see them all)\n")) {
+ score->error = tal_strcat(score,
+ take(score->error),
+ "... more (use -vv to see"
+ " them all)\n");
+ }
+ return;
+ }
+
+ tal_append_fmt(&score->error, "%s:", source);
+ tal_append_vfmt(&score->error, errorfmt, ap);
+ score->error = tal_strcat(score, take(score->error), "\n");
+}
+
+
+
+void score_error(struct score *score, const char *source,
+ const char *errorfmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, errorfmt);
+ score_error_vfmt(score, source, errorfmt, ap);
+ va_end(ap);
+}
+