mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
13 lines
241 B
JavaScript
13 lines
241 B
JavaScript
'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;
|