Print stack in devtool exception warning (#6768)
Ben Alpert committed
May 14, 2016 at 12:12 UTC
5b5bd5eb75f96630148bc337f163aa517c6bb89e
4 files changed
+4
-4
src/isomorphic/ReactDebugTool.js
+1
-1
@@ -31,7 +31,7 @@ function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
31
handlerDoesThrowForEvent[handlerFunctionName],
32
'exception thrown by devtool while handling %s: %s',
33
handlerFunctionName,
34
- e.message
34
+ e + '\n' + e.stack
35
);
36
handlerDoesThrowForEvent[handlerFunctionName] = true;
37
}
src/isomorphic/__tests__/ReactDebugTool-test.js
+1
-1
@@ -66,7 +66,7 @@ describe('ReactDebugTool', function() {
66
expect(console.error.calls.length).toBe(1);
67
expect(console.error.argsForCall[0][0]).toContain(
68
'exception thrown by devtool while handling ' +
69
- 'onTestEvent: Hi.'
69
+ 'onTestEvent: Error: Hi.'
70
);
71
72
ReactDebugTool.onTestEvent();
src/renderers/dom/shared/ReactDOMDebugTool.js
+1
-1
@@ -31,7 +31,7 @@ function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
31
handlerDoesThrowForEvent[handlerFunctionName],
32
'exception thrown by devtool while handling %s: %s',
33
handlerFunctionName,
34
- e.message
34
+ e + '\n' + e.stack
35
);
36
handlerDoesThrowForEvent[handlerFunctionName] = true;
37
}
src/renderers/dom/shared/__tests__/ReactDOMDebugTool-test.js
+1
-1
@@ -66,7 +66,7 @@ describe('ReactDOMDebugTool', function() {
66
expect(console.error.calls.length).toBe(1);
67
expect(console.error.argsForCall[0][0]).toContain(
68
'exception thrown by devtool while handling ' +
69
- 'onTestEvent: Hi.'
69
+ 'onTestEvent: Error: Hi.'
70
);
71
72
ReactDOMDebugTool.onTestEvent();