Throw an exception when a WPF Binding error occurs. Get started by adding WpfBindingErrors.BindingExceptionThrower.Attach(); to your WPF application.
$ dotnet add package WpfBindingErrorsThis project is a reusable assembly that converts WPF binding errors into exceptions.
Feel free to include it in your own project.
BindingException is the typed exception thrown when a binding error occursBindingExceptionThrower is the one that throws BindingException.BindingErrorListener adds a listener to PresentationTraceSources.DataBindingSource. It raises the event ErrorCatched whenever a binding error occurs.ObservableTraceListener is internal; it's an override of System.Diagnostics.TraceListener and it raises the event TraceCatched whenever a trace is written.See an example in project SampleWpfApplicationTests in this repository.

The simplest way is to use BindingExceptionThrower because it handles everything for you:
BindingExceptionThrower.Attach()
That's all.
Once you called Attach(), every WPF binding error will raise a BindingException.
See an example in project SampleWpfApplication in this repository.
However, if you want to be aware of binding errors without throwing an exception, you can use BindingErrorListener and attach to the ErrorCatched event.
using( var listener = new BindingErrorListener())
{
listener.ErrorCatched += msg => Console.WriteLine("Binding error: {0}", msg);
// ...do what you want here...
}