exception

exception virtualitics_sdk.exceptions.exception.PredictException(message_override='')

Bases: Exception

Parameters:

message_override (str) – Overrides the default ‘An exception has occurred’ with custom message.

EXAMPLE:

# Imports
from virtualitics_sdk.exceptions.exception import PredictException
. . .
# Example usage 
# throwing exception in some function 
def example_func(self, flow_metadata, pyvip_client=None):
    api_key = parse_api_key(api_key_connection)
        if not api_key:
            raise PredictException("You need a valid API key stored in the connection store")
message = 'An exception has occurred'