Is there a way to detect what object from a list throw exceptions and destroy this object ?

I have in the Hierarchy a parent and under the parent a lot of prefabs over 100.
Some of the prefabs throw exceptions since they are missing components scripts or variables that was not assigned. I want some how when running the game in a script in Awake() to detect this prefabs and destroy them.

Under Ammo Test I have a lot of prefabs in nested children and more.

I can’t just look for each one to check where and what is missing or wrong it will take too much time. I wonder if there is a way to make it automatic when running the game first time and to clean the “bad” prefabs ?

I thought doing it already in the editor mode with editor script right after or when instantiating the prefabs but this seems even harder so maybe there is a way to do it in runtime using a script that will loop over the prefabs under Ammo Test and will destroy the prefabs that make the problems.

This code is more or less closer to what I need :

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ErrorsTester : MonoBehaviour
{
    void OnEnable()
    {
        Application.logMessageReceived += LogCallback;
    }

    //Called when there is an exception
    void LogCallback(string condition, string stackTrace, LogType type)
    {
       
    }

    void OnDisable()
    {
        Application.logMessageReceived -= LogCallback;
    }

    // Start is called before the first frame update
    void Start()
    {
       
    }

    // Update is called once per frame
    void Update()
    {
       
    }
}

but the function LogCallback don’t show the gameobject in the hierarchy that make the problem. I need to find the gameobject(prefab) name in the hierarchy so I can destroy it right on place inside the function LogCallback.