### Method

# Ide Pipeline add_error_format

#### Declaration

    guint
    ide_pipeline_add_error_format (
      IdePipeline* self,
      const gchar* regex,
      GRegexCompileFlags flags
    )

#### Description

This can be used to add a regex that will extract errors from standard output. This is similar to the “errorformat” feature of vim to extract warnings from standard output.

The regex should used named capture groups to pass information to the extraction process.

Supported group names are:

• filename (a string path) • line (an integer) • column (an integer) • level (a string) • message (a string)

For example, to extract warnings from GCC you might do something like the following:

“(?<filename>[a-zA-Z0-9-.\/_]+):” “(?<line>\d+):” “(?<column>\d+): ” “(?<level>[\w\s]+): ” “(?<message>.*)”

To remove the regex, use the `ide_pipeline_remove_error_format()` function with the resulting format id returned from this function.

The resulting format id will be > 0 if successful.

Available since: | 3.32

#### Parameters

`regex` | `const gchar*`
| A regex to be compiled.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`flags` | `GRegexCompileFlags`
| No description available.

#### Return value

Returns: | `guint`
| An error format id that may be passed to ide_pipeline_remove_error_format().