1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 17:45:10 +01:00
onion/js/mixins/react_error.js

13 lines
241 B
JavaScript
Raw Normal View History

'use strict';
import invariant from 'invariant';
const ReactError = {
throws(err) {
invariant(err.handler, 'You need to specify a `handler` for this error');
err.handler(this, err);
}
};
export default ReactError;