2018-07-11 23:58:42 +02:00
|
|
|
import React from 'react'
|
|
|
|
export default class ErrorInRenderPage extends React.Component {
|
2019-11-11 04:24:53 +01:00
|
|
|
render() {
|
2018-07-11 23:58:42 +02:00
|
|
|
if (typeof window !== 'undefined') {
|
2018-11-27 12:28:34 +01:00
|
|
|
const error = new Error('An Expected error occurred')
|
2018-07-11 23:58:42 +02:00
|
|
|
// This will be extracted by getInitialProps in the _error page,
|
|
|
|
// which will result in a different error message being rendered.
|
|
|
|
error.statusCode = 404
|
|
|
|
throw error
|
|
|
|
}
|
|
|
|
return <div />
|
|
|
|
}
|
|
|
|
}
|