Exemple #1
0
void print_invocation_on(value_t tags, frame_t *frame, string_buffer_t *buf) {
  int64_t arg_count = get_call_tags_entry_count(tags);
  string_buffer_printf(buf, "{");
  for (int64_t i = 0;  i < arg_count; i++) {
    value_t tag = get_call_tags_tag_at(tags, i);
    value_t arg = frame_get_pending_argument_at(frame, tags, i);
    if (i > 0)
      string_buffer_printf(buf, ", ");
    string_buffer_printf(buf, "%v: %v", tag, arg);
  }
  string_buffer_printf(buf, "}");
}
Exemple #2
0
static void log_lookup_error(value_t condition, value_t tags, frame_t *frame) {
    size_t arg_count = get_call_tags_entry_count(tags);
    string_buffer_t buf;
    string_buffer_init(&buf);
    string_buffer_printf(&buf, "%v: {", condition);
    for (size_t i = 0; i < arg_count; i++) {
        if (i > 0)
            string_buffer_printf(&buf, ", ");
        value_t tag = get_call_tags_tag_at(tags, i);
        value_t value = frame_get_pending_argument_at(frame, tags, i);
        string_buffer_printf(&buf, "%v: %v", tag, value);
    }
    string_buffer_printf(&buf, "}");
    string_t str;
    string_buffer_flush(&buf, &str);
    ERROR("%s", str.chars);
    string_buffer_dispose(&buf);
}