From 6ab87322e1ff5f8d5f39d3348b7a6c50d13caf27 Mon Sep 17 00:00:00 2001 From: Artem Sapegin Date: Thu, 4 Feb 2016 16:18:01 +0100 Subject: [PATCH 1/2] Show error message, not just a stack trace. --- src/instrument.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/instrument.js b/src/instrument.js index 7195979a..3b6d5678 100644 --- a/src/instrument.js +++ b/src/instrument.js @@ -77,7 +77,7 @@ function computeNextEntry(reducer, action, state, error) { // In Chrome, rethrowing provides better source map support setTimeout(() => { throw err; }); } else { - console.error(err.stack || err); + console.error(err); } } From 30718acd8ef2c75ca0475dfa33ba1d810d49680a Mon Sep 17 00:00:00 2001 From: Artem Sapegin Date: Thu, 4 Feb 2016 17:22:36 +0100 Subject: [PATCH 2/2] Fix tests. --- test/instrument.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/instrument.spec.js b/test/instrument.spec.js index c8abc4af..1c0ac858 100644 --- a/test/instrument.spec.js +++ b/test/instrument.spec.js @@ -169,7 +169,7 @@ describe('instrument', () => { expect(computedStates[3].error).toMatch( /Interrupted by an error up the chain/ ); - expect(spy.calls[0].arguments[0]).toMatch( + expect(spy.calls[0].arguments[0].toString()).toMatch( /ReferenceError/ );