Affected components: those inheriting from TelerikInputBase (e.g., TelerikDatePicker). When an exception is thrown inside an async Task event handler for the OnChange, OnBlur, OnOpen, and ValueChanged events, the exception is completely and silently swallowed. The exception is not caught by ErrorBoundary.
<ErrorBoundary>
<ChildContent>
@Body
</ChildContent>
<ErrorContent>
<p class="error">An unhandled error has occurred.</p>
</ErrorContent>
</ErrorBoundary>
<TelerikDatePicker Value="@DatePickerValue"
ValueChanged="@((DateTime inputDate) => OnDatePickerValueChanged(inputDate))">
</TelerikDatePicker>
<TelerikButton OnClick="@(() => throw new Exception("Exception from button"))">Click to test ErrorBoundary</TelerikButton>
@code {
private DateTime DatePickerValue { get; set; } = DateTime.Today;
private async Task OnDatePickerValueChanged(DateTime newValue)
{
throw new InvalidOperationException("This exception should be caught by the ErrorBoundary!");
}
}
The exception thrown in the OnDatePickerValueChanged
event handler is not caught by ErrorBoundary.
The exception thrown in the OnDatePickerValueChanged
event handler is caught by ErrorBoundary.
All
No response