== `error.hpp`
[#error]

The error header provides two error categories:

[source,cpp]
----
// Errors used for utf8 <-> UCS-2 conversions.
enum utf8_conv_error
{
    insufficient_buffer = 1,
    invalid_character,
};

extern const error_category& get_utf8_category();
static const error_category& utf8_category = get_utf8_category();

extern const error_category& get_exit_code_category();

/// An error category that can be used to interpret exit codes of subprocesses.
static const error_category& exit_code_category = get_exit_code_category();

}
----

The `get_exit_code_category` can be used as follows:

[source,cpp]
----
void run_my_process(filesystem::path pt, error_code & ec)
{
  process proc(pt, {});
  proc.wait();
  ec.assign(proc.native_exit_code(), error::get_exit_code_category());
}
----