diff --git a/app/soapbox/features/intentional_error/index.js b/app/soapbox/features/intentional_error/index.js new file mode 100644 index 000000000..b3d7fa0f7 --- /dev/null +++ b/app/soapbox/features/intentional_error/index.js @@ -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.'; + } + +} diff --git a/app/soapbox/features/ui/index.js b/app/soapbox/features/ui/index.js index 83f1bbbec..a16b12bf3 100644 --- a/app/soapbox/features/ui/index.js +++ b/app/soapbox/features/ui/index.js @@ -114,6 +114,7 @@ import { RegisterInvite, Share, NewStatus, + IntentionalError, } from './util/async-components'; // Dummy import, to make sure that ends up in the application bundle. @@ -317,6 +318,7 @@ class SwitchingColumnsArea extends React.PureComponent { + diff --git a/app/soapbox/features/ui/util/async-components.js b/app/soapbox/features/ui/util/async-components.js index 1e337f682..2223eeb92 100644 --- a/app/soapbox/features/ui/util/async-components.js +++ b/app/soapbox/features/ui/util/async-components.js @@ -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'); +}