create account

RE: Saving Notes to a JSON file: Day Six of "The Complete Node.js Developer Course" by matthewdavid

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @woz.software/re-matthewdavid-saving-notes-to-a-json-file-day-six-of-the-complete-node-js-developer-course-20170907t063203129z

· @matthewdavid ·
I see what you are saying with this and I thought about it when going through this exercise. This section in the course left the code like this, but it makes sense to give some feedback if an error occurred. I think the next section will be refactoring this bit of code so that the logic can be reused by other functions. We'll see when I get there.
👍  
properties (23)
authormatthewdavid
permlinkre-wozsoftware-re-matthewdavid-saving-notes-to-a-json-file-day-six-of-the-complete-node-js-developer-course-20170908t032049695z
categoryjavascript
json_metadata{"tags":["javascript"],"app":"steemit/0.1"}
created2017-09-08 03:20:48
last_update2017-09-08 03:20:48
depth2
children2
last_payout2017-09-15 03:20:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length349
author_reputation2,155,255,892,877
root_title"Saving Notes to a JSON file: Day Six of "The Complete Node.js Developer Course""
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,211,696
net_rshares5,807,306,112
author_curate_reward""
vote details (1)
@woz.software ·
Will be interesting to see what they propose is the correct way after the refactor :)
properties (22)
authorwoz.software
permlinkre-matthewdavid-re-wozsoftware-re-matthewdavid-saving-notes-to-a-json-file-day-six-of-the-complete-node-js-developer-course-20170908t062815476z
categoryjavascript
json_metadata{"tags":["javascript"],"app":"steemit/0.1"}
created2017-09-08 06:28:15
last_update2017-09-08 06:28:15
depth3
children0
last_payout2017-09-15 06:28:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length85
author_reputation2,321,910,395,519
root_title"Saving Notes to a JSON file: Day Six of "The Complete Node.js Developer Course""
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,222,930
net_rshares0
@woz.software ·
One other thing I noticed is there is no try/catch around the writing of the file so if that fails for whatever reason it will bubble up while the read is caught. Was that intentional?
properties (22)
authorwoz.software
permlinkre-matthewdavid-re-wozsoftware-re-matthewdavid-saving-notes-to-a-json-file-day-six-of-the-complete-node-js-developer-course-20170908t063211023z
categoryjavascript
json_metadata{"tags":["javascript"],"app":"steemit/0.1"}
created2017-09-08 06:32:12
last_update2017-09-08 06:32:12
depth3
children0
last_payout2017-09-15 06:32:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length184
author_reputation2,321,910,395,519
root_title"Saving Notes to a JSON file: Day Six of "The Complete Node.js Developer Course""
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id14,223,218
net_rshares0