mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
1c36b5b9ab
* Add specific test cases for Error Recovery. * Update hmr/about.js * Add a test case: should recover after a bad return from the render function * Add test case: should recover from errors in getInitialProps in client * Add test case: should recover after an error reported via SSR * Add a test case: should recover from 404 after a page has been added * Refactor code base.
12 lines
230 B
JavaScript
12 lines
230 B
JavaScript
import React from 'react'
|
|
export default class extends React.Component {
|
|
static getInitialProps () {
|
|
const error = new Error('an-expected-error-in-gip')
|
|
throw error
|
|
}
|
|
|
|
render () {
|
|
return (<div>Hello</div>)
|
|
}
|
|
}
|