Skip to content

Commit

Permalink
modified message, updated js styling
Browse files Browse the repository at this point in the history
  • Loading branch information
dzirtusss committed Aug 19, 2016
1 parent 84824b1 commit 7d7dddb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion node_package/src/clientStartup.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ You should return a React.Component always for the client side entry point.`);
}
}
} catch (e) {
e.message = `Exception in rendering ${name}. ${e.message}`;
e.message = `ReactOnRails encountered an error while rendering component: ${name}.` +
`Original message: ${e.message}`;
throw e;
}
}
Expand Down
4 changes: 3 additions & 1 deletion node_package/src/handleError.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ component \'${name}\' is not a generator function.\n${lastLine}`;
return msg;
}

export default (options) => {
const handleError = (options) => {
const { e, jsCode, serverSide } = options;

console.error('Exception in rendering!');
Expand Down Expand Up @@ -64,3 +64,5 @@ ${e.stack}`;
return ReactDOMServer.renderToString(reactElement);
}
};

export default handleError;

0 comments on commit 7d7dddb

Please sign in to comment.