@@ -40,11 +40,19 @@ export class ErrorHandler extends React.Component {
...
@@ -40,11 +40,19 @@ export class ErrorHandler extends React.Component {
returnthis.props.children
returnthis.props.children
}
}
}
}
ErrorHandler.propTypes=({
children:PropTypes.object,
message:PropTypes.string,// Fixed error message. Provide either this or errorHandler
errorHandler:PropTypes.func,// Function that is called once an error is caught. It recveives the error object as argument and should return an error message as string.
message:PropTypes.string,// Fixed error message. Provide either this or errorHandler
errorHandler:PropTypes.func,// Function that is called once an error is caught. It recveives the error object as argument and should return an error message as string.