Homec4science

Don't exit from the Aphlict Server prematurely

Authored by Joshua Spence <josh@joshuaspence.com> on Jan 19 2015, 20:36.

Description

Don't exit from the Aphlict Server prematurely

Summary: By calling process.exit(1) we are forcing the Node.js process to exit prematurely. Specifically, the process is terminated before the error is written to the log file. This can be verified by inspecting the value of debug._logs[0]._writableState.writing immediately before the process is terminated.

Test Plan: Ran ./bin/aphlict debug without the ws module being installed. Verified that <<< UNCAUGHT EXCEPTION! >>> was echoed to the console as well as the log file. Also verified that the exit status was non-zero.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11426

Details

Committed
Joshua Spence <josh@joshuaspence.com>Jan 19 2015, 20:36
Pushed
aubortJan 31 2017, 17:16
Parents
rPH3bc54c2041be: Project revamp part 2: Edit
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rPH2b12f6160213: Don't exit from the Aphlict Server prematurely (authored by Joshua Spence <josh@joshuaspence.com>).Jan 19 2015, 20:36