| Name |
Type |
Default value |
Description |
|---|
| AdditionalButtons |
RenderFragment? |
null |
The extra content of the footer of the boundary's default error UI, rendered after the Refresh, Home and Recover buttons. A boundary that sets Footer never renders it. |
| AutoFocus |
bool |
false |
Moves the browser focus to the error UI as it appears, once per error. An error UI drawn by ErrorTemplate or ErrorContent has no element of the boundary's to move it to. |
| Body |
RenderFragment? |
null |
Alias of the ChildContent. |
| ChildContent |
RenderFragment? |
null |
The content the boundary renders and watches over while it has caught nothing. |
| Class |
string? |
null |
The CSS class of the root element of the boundary's error UI. |
| Classes |
BitErrorBoundaryClassStyles? |
null |
Custom CSS classes for different parts of the boundary's default error UI. |
| CopiedText |
string? |
null |
The text the Copy button carries while what it copied is still on the clipboard. Defaults to "Copied". |
| CopyText |
string? |
null |
The text of the Copy button. Defaults to "Copy details". |
| Dir |
BitDir? |
null |
The text directionality of the boundary's error UI. |
| ErrorContent |
RenderFragment<Exception>? |
null |
The inherited template of the error UI, receiving the caught exception alone. ErrorTemplate takes precedence over it. |
| ErrorTemplate |
RenderFragment<BitErrorBoundaryContext>? |
null |
The template of the error UI, receiving the caught exception along with the boundary's own Recover, Refresh and GoHome actions. |
| ExceptionLabel |
string? |
null |
The accessible name of the exception details block rendered by ShowException. Defaults to "Exception details", and an empty value drops the name and the region role with it. |
| Footer |
RenderFragment? |
null |
The footer content of the boundary, replacing the default Refresh, Home and Recover buttons while keeping the footer element they are laid out in. |
| HideHomeButton |
bool |
false |
Prevents rendering the Home button of the default error UI. |
| HideIcon |
bool |
false |
Prevents rendering the icon of the default error UI. |
| HideRecoverButton |
bool |
false |
Prevents rendering the Recover button of the default error UI. |
| HideRefreshButton |
bool |
false |
Prevents rendering the Refresh button of the default error UI. |
| HomeText |
string? |
null |
The text of the Home button. |
| HomeUrl |
string? |
null |
The url of the home page for the Home button. Defaults to the site root. |
| HtmlAttributes |
Dictionary<string, object>? |
null |
The HTML attributes to be applied to the root element of the boundary's error UI. |
| Icon |
BitIconInfo? |
null |
The icon to display using custom CSS classes for external icon libraries. Takes precedence over IconName when both are set. |
| IconName |
string? |
null |
The name of the icon to render in place of the built-in illustration. |
| IconTemplate |
RenderFragment? |
null |
The template of the icon, replacing both the built-in illustration and IconName. |
| Id |
string? |
null |
The id of the root element of the boundary's error UI. |
| MaximumErrorCount |
int |
100 |
The number of errors this boundary handles before it stops absorbing them and lets the next one through as fatal. Recovering resets the count. |
| Message |
string? |
null |
The message rendered under the title of the default error UI. Nothing is rendered while it has no value. |
| NoLogging |
bool |
false |
Prevents the boundary from logging the caught exception through the app's IErrorBoundaryLogger. |
| OnError |
EventCallback<Exception> |
|
The callback for when an error gets caught by the boundary, called before the error UI is rendered. |
| OnRecover |
EventCallback<BitErrorBoundaryRecoverReason> |
|
The callback for when the boundary leaves its errored state, receiving which of the routes back out of it was taken. |
| RecoverKeys |
IEnumerable<object?>? |
null |
The values that recover the boundary as they change. |
| RecoverOnNavigation |
bool |
false |
Recovers the boundary when the reader navigates to another location. |
| RecoverText |
string? |
null |
The text of the Recover button. |
| RefreshText |
string? |
null |
The text of the Refresh button. |
| ShowCopyButton |
bool |
false |
Renders a Copy button in the footer of the default error UI, putting the exception's full text on the clipboard. |
| ShowException |
bool |
false |
Whether the actual exception information should be shown or not. |
| Style |
string? |
null |
The CSS style of the root element of the boundary's error UI. |
| Styles |
BitErrorBoundaryClassStyles? |
null |
Custom CSS styles for different parts of the boundary's default error UI. |
| Title |
string? |
null |
The header title of the boundary. Defaults to "Oops, Something went wrong...". |
| Name |
Type |
Default value |
Description |
|---|
| CaughtException |
Exception? |
null |
The exception the boundary is currently showing, or null while it has caught nothing. |
| Capture |
void Capture(Exception exception) |
|
Hands the boundary an exception that never passed through the renderer, putting it into exactly the state a caught one would. Call it on the renderer's synchronization context. |
| CaptureAsync |
Task CaptureAsync(Exception exception) |
|
Capture from a thread that is not the renderer's. |
| Recover |
void Recover() |
|
Clears the error and renders the boundary's content again, raising OnRecover. Never call it from rendering logic. |
| Refresh |
void Refresh() |
|
Reloads the current page in the browser, which is what the default UI's Refresh button does. |
| GoHome |
void GoHome() |
|
Navigates to HomeUrl, which is what the default UI's Home button does. |
| Name |
Type |
Default value |
Description |
|---|
| AriaLabel |
string? |
null |
Gets or sets the accessible label for the component, used by assistive technologies. |
| Class |
string? |
null |
Gets or sets the CSS class name(s) to apply to the rendered element. |
| Dir |
BitDir? |
null |
Gets or sets the text directionality for the component's content. |
| ForceAnimation |
bool |
false |
Gets or sets a value indicating whether the component's animations play at their full duration even when reduced motion is requested. |
| HtmlAttributes |
Dictionary<string, object> |
new Dictionary<string, object>() |
Captures additional HTML attributes to be applied to the rendered element, in addition to the component's parameters. |
| Id |
string? |
null |
Gets or sets the unique identifier for the component's root element. |
| IsEnabled |
bool |
true |
Gets or sets a value indicating whether the component is enabled and can respond to user interaction. |
| Style |
string? |
null |
Gets or sets the CSS style string to apply to the rendered element. |
| TabIndex |
string? |
null |
Gets or sets the tab order index for the component when navigating with the keyboard. |
| Visibility |
BitVisibility |
BitVisibility.Visible |
Gets or sets the visibility state (visible, hidden, or collapsed) of the component. |
BitErrorBoundaryContext properties
What an ErrorTemplate is handed: the exception that was caught and the three ways out of it that the boundary's own error UI offers.
| Name |
Type |
Default value |
Description |
|---|
| Exception |
Exception |
|
The exception the boundary caught. |
| Recover |
Action |
|
Clears the error and renders the boundary's content again, exactly like the default UI's Recover button. |
| Refresh |
Action |
|
Reloads the current page in the browser, exactly like the default UI's Refresh button. |
| GoHome |
Action |
|
Navigates to HomeUrl, exactly like the default UI's Home button. |