Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

C/C++ API Documentation | 2026.1

# Error - collect and report layered errors

Member functions in this class are used to store error messages, along with information about generic type and severity, format error messages into a form suitable for display to an end user, or marshal them into a form suitable for transferring over a network.

`Error` objects are used to collect information about errors that occur while running a P4 Server command.

When a connection is opened with `ClientApi::Init()`, a reference to an `Error` object is passed as an argument to `Init()`. This `Error` object then accumulates any errors that occur; a single `Error` object can hold information about multiple errors. The `Error` can then be checked, and its contents reported if necessary.

Although `Error` itself does not provide any virtual methods that can be re-implemented, the manner in which errors are handled can be changed by re-implementing `ClientUser::HandleError()`. The default behavior for handling errors typically consists of simply formatting and displaying the messages, but `Error` objects maintain additional information, such as severity levels, which can be used to handle errors more intelligently.

Your search for returned results