Closed nitya closed 9 years ago
A similar issue for (Submitting Comments) (Commit 10-3) -- this is more than cosmetic, since in this case the GitHub code itself has the error and could cause problems if activated.
In the "client/templates/comments/comment_submit.js" snippet, the code still shows the use of "throwError" in the Meteor call. This was replaced with use of Error.throws(..) in the Errors chapter but the book snippet AND the GitHub code don't reflect this.
The 'throwsError' function that they invoke here does not exist anymore.
Oh, actually sidebar chapters are outside of the main flow of the book. So you can keep using the throwError
function in your main codebase, you don't have to replace it with Errors.throw
outside of the Package chapter.
Thanks @nitya
In the version of the book released Dec 2014, this chapter has a code snippet for client/templates/posts/post_submit.js
The snippet indicates that 'throwError" calls need to be replaced with Errors.throw(..) calls to leverage the newly created package.
There are two such instances to be replaced in this file - the code snippet only shows one of them.
If the user fails to update both, they will get an error when they hit submit.
This is a cosmetic error, but submitted in the interests of clarity - the book does a fantastic job of explaining things so most folks will probably figure it out anyway..