# cee::pt::Error

class `Error`

  Error object for simple error management

  Public Types

  enum `Code`

    Available error codes.

    Values:

    enumerator `ERR_NOT_SET`

      Error not set

    enumerator `ERR_FILE_NOT_FOUND`

      File or directory not found.

    enumerator `ERR_FILE_OPEN`

      Error opening file

    enumerator `ERR_FILE_READ`

      Error reading file

    enumerator `ERR_UNSUPPORTED_FORMAT`

      Unsupported file type or encoding.

    enumerator `ERR_INVALID_FORMAT`

      Internal errors in the file (corrupt or non-conformant data)

    enumerator `ERR_NO_DATA`

      No frames or no particles found.

    enumerator `ERR_OUT_OF_RANGE`

      Index out of valid range.

    enumerator `ERR_NOT_OPEN`

      Operation requires an open dataset.

    enumerator `ERR_USER_DEFINED_MESSAGE`

      A user-defined message (see userDefinedErrorMessage())

  Public Functions

  `Error`()

    Constructs an empty error object.

  Code `errorCode`() const

    Returns the error code.

  void `setErrorCode`(Code errorCode)

    Sets the error code.

  Str `userDefinedErrorMessage`() const

    Returns the user defined error message.

  void `setUserDefinedError`(const Str &errorMessage)

    Sets a user defined error message and sets the error code to ERR_USER_DEFINED_MESSAGE.

  Public Static Functions

  static void `safeSetErrorCode`(Error *errorObj, Code errorCode)

    Safely sets the error code by first checking if errorObj is NULL.

  static void `safeSetUserDefinedError`(Error *errorObj, const Str &errorMessage)

    Safely sets the user defined error message by first checking if errorObj is NULL.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...