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

C/C++ API Documentation | 2025.1

# Error::operator << ( int )

Add data to the text of an error message.

Virtual? | No |
| Class | `Error`
Arguments | `int arg` | text to be added to this `Error`
Returns | `Error &` | a reference to the modified `Error`

## Notes

The “<<” operator can be used to add text to an error as if the error is an output stream. This operator is typically used in the implementation of other `Error` methods.

Note that an `Error` consists of more than its text, it’s more useful to use `Set()` to establish a base `Error` and then add text into that, rather than merely adding text to an empty `Error` object.

## Example

The following example creates an `Error` using `Set()` and the `<<` operator.

    e.Set( E_WARN, "Warning, number " ) << myErrNum;

Your search for returned results