Frameworks
Manually handling errors
If you're using a framework like React with an ErrorBoundary
, you can ensure errors are reported to us by calling:
window.byteboost.handleException(error);
Example for React
import { Component } from 'react';
class MyComponent extends Component {
componentDidCatch(error, errorInfo) {
window.byteboost.handleException(error);
}
render() {
return <div>My Component</div>;
}
}
Works with Any Framework
This method works in any framework—just make sure to pass the actual error object to handleException
.