mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Print stack in devtool exception warning (#6768)
This commit is contained in:
1 parent
03f4ba260b
commit
5b5bd5eb75
4 files changed
+4
-4
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user