Merge branch 'intentional-error' into 'develop'
IntentionalError: display an ErrorBoundary preview at /error See merge request soapbox-pub/soapbox-fe!841
This commit is contained in:
commit
37754c610a
3 changed files with 19 additions and 0 deletions
13
app/soapbox/features/intentional_error/index.js
Normal file
13
app/soapbox/features/intentional_error/index.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
import React from 'react';
|
||||
|
||||
/**
|
||||
* IntentionalError:
|
||||
* For testing logging/monitoring & previewing ErrorBoundary design.
|
||||
*/
|
||||
export default class IntentionalError extends React.Component {
|
||||
|
||||
render() {
|
||||
throw 'This error is intentional.';
|
||||
}
|
||||
|
||||
}
|
|
@ -114,6 +114,7 @@ import {
|
|||
RegisterInvite,
|
||||
Share,
|
||||
NewStatus,
|
||||
IntentionalError,
|
||||
} from './util/async-components';
|
||||
|
||||
// Dummy import, to make sure that <Status /> ends up in the application bundle.
|
||||
|
@ -317,6 +318,7 @@ class SwitchingColumnsArea extends React.PureComponent {
|
|||
<WrappedRoute path='/admin/log' page={AdminPage} component={ModerationLog} content={children} exact />
|
||||
<WrappedRoute path='/admin/users' page={AdminPage} component={UserIndex} content={children} exact />
|
||||
<WrappedRoute path='/info' page={EmptyPage} component={ServerInfo} content={children} />
|
||||
<WrappedRoute path='/error' page={EmptyPage} component={IntentionalError} content={children} />
|
||||
|
||||
<WrappedRoute path='/donate/crypto' publicRoute page={DefaultPage} component={CryptoDonate} content={children} />
|
||||
<WrappedRoute path='/federation_restrictions' publicRoute page={DefaultPage} component={FederationRestrictions} content={children} />
|
||||
|
|
|
@ -421,3 +421,7 @@ export function Share() {
|
|||
export function NewStatus() {
|
||||
return import(/* webpackChunkName: "features/new_status" */'../../new_status');
|
||||
}
|
||||
|
||||
export function IntentionalError() {
|
||||
return import(/* webpackChunkName: "error" */'../../intentional_error');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue