#!/usr/bin/env python
# Script            : Main script for model deployment
# Component         : GenAi model deployment
# Author            : Vinay Namani & Bijoy Kumar Roy
# Copyright (c)     : 2024 Katonic Pty Ltd. All rights reserved.

import sys
import traceback
from pathlib import Path

def handle_exception():
    error_traceback = traceback.format_exc()
    traceback_lines = error_traceback.splitlines()
    error_traceback = traceback_lines[-1]
    error_message = "An error occurred. Traceback:\n" + error_traceback
    return str(error_message)