Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
/* eslint-env node */
const App = require('fusion-core').default;
// eslint-disable-next-line import/no-unresolved
// $FlowFixMe
const {default: Plugin, ErrorHandlerToken} = require('../dist/index.js');
const onError = e => {
console.log('ERROR HANDLER', e); // eslint-disable-line
};
const app = new App('el', el => el);
app.register(Plugin);
app.register(ErrorHandlerToken, onError);
app.resolve();
// keep the process running
setInterval(() => {}, 1000);
Promise.reject(new Error('FAIL'));
* LICENSE file in the root directory of this source tree.
*
* @flow
*/
/* eslint-env node */
const App = require('fusion-core').default;
// eslint-disable-next-line import/no-unresolved
// $FlowFixMe
const {default: Plugin, ErrorHandlerToken} = require('../dist/index.js');
const onError = e => {
console.log('ERROR HANDLER', e); // eslint-disable-line
};
const app = new App('el', el => el);
app.register(Plugin);
app.register(ErrorHandlerToken, onError);
app.resolve();
// keep the process running
setInterval(() => {}, 1000);
throw new Error('FAIL');