def get_exception_info(exception: BaseException) -> dict:
    """
        Given an Exception object, retrieves some information about it: class and message.
        :param exception: An exception which inherits from the BaseException class.
        :return: A dict, containing two values:
                    - class: The name of the exception's class.
                    - message: The message attached to the exception, if exists.
    """
    return {'class': exception.__class__.__name__, 'message': exception.__str__()}