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

C/C++ API Documentation | 2025.1

# Error::Set( enum ErrorSeverity, const char * )

Add an error message to an `Error`.

Virtual? | No |
Class | `Error` |
Arguments | `enum ErrorSeverity s` |
| `const char *fmt` |
Returns | `void` |

## Notes

An `Error` can hold multiple error messages; `Set()` adds the error message to the `Error`, rather than replacing the `Error’s` previous contents.

An `ErrorSeverity` is an `int` from 0-4 as described in the documentation on `GetSeverity()`.

## Example

The following example adds a fatal error to an `Error` object.

    Error e;
    e.Set( E_FATAL, "Fatal error!");

Your search for returned results