Print stack in devtool exception warning (#6768)

This commit is contained in:
Ben Alpert committed 2016-05-14 12:12:19 -07:00
1 parent 03f4ba260b
commit 5b5bd5eb75
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
handlerDoesThrowForEvent[handlerFunctionName],
'exception thrown by devtool while handling %s: %s',
handlerFunctionName,
e.message
e + '\n' + e.stack
);
handlerDoesThrowForEvent[handlerFunctionName] = true;
}
@@ -66,7 +66,7 @@ describe('ReactDebugTool', function() {
expect(console.error.calls.length).toBe(1);
expect(console.error.argsForCall[0][0]).toContain(
'exception thrown by devtool while handling ' +
'onTestEvent: Hi.'
'onTestEvent: Error: Hi.'
);
ReactDebugTool.onTestEvent();
@@ -31,7 +31,7 @@ function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) {
handlerDoesThrowForEvent[handlerFunctionName],
'exception thrown by devtool while handling %s: %s',
handlerFunctionName,
e.message
e + '\n' + e.stack
);
handlerDoesThrowForEvent[handlerFunctionName] = true;
}
@@ -66,7 +66,7 @@ describe('ReactDOMDebugTool', function() {
expect(console.error.calls.length).toBe(1);
expect(console.error.argsForCall[0][0]).toContain(
'exception thrown by devtool while handling ' +
'onTestEvent: Hi.'
'onTestEvent: Error: Hi.'
);
ReactDOMDebugTool.onTestEvent();