Skip to content

Commit

Permalink
core: Enhanced error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
maxott committed Oct 8, 2020
1 parent 898a113 commit 3acc348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/redux/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ export class Reducer {
try {
const s2 = reducer(s, action);
if (!isPlainObject(s2)) {
dispatchError(`Reducer '${reducer}' returns unexpected value '${s2}'`);
dispatchError(`Reducer '${reducer}' for action '${action}' returns unexpected value '${s2}'`);
return s; // ignore 'reducer'
}
return s2;
} catch (e) {
dispatchError(`While executing ${reducer} - ${e}`, e);
dispatchError(`While executing action '${action}' with reducer '${reducer}' - ${e}`, e);
return s; // ignore 'reducer'
}
}, state);
Expand Down

0 comments on commit 3acc348

Please sign in to comment.