Function catchErrorAndSendMsg

  • This function catches the error of a promise and sends a message

    Parameters

    • promise: Promise<any>
    • ws: WebSocket

    Returns void