Page MenuHomePhabricator

Don't exit from the Aphlict Server prematurely
ClosedPublic

Authored by joshuaspence on Jan 19 2015, 11:00 AM.
Tags
None
Referenced Files
F18747036: D11426.id.diff
Fri, Oct 3, 2:23 PM
F18747035: D11426.id27461.diff
Fri, Oct 3, 2:23 PM
F18747026: D11426.id27451.diff
Fri, Oct 3, 2:21 PM
F18740600: D11426.id27451.diff
Thu, Oct 2, 4:08 AM
F18672054: D11426.diff
Thu, Sep 25, 6:24 AM
F18611640: D11426.id.diff
Sep 14 2025, 7:30 AM
F18600973: D11426.diff
Sep 13 2025, 11:11 AM
F18360058: D11426.diff
Aug 27 2025, 10:02 AM
Subscribers

Details

Reviewers
epriestley
Group Reviewers
Blessed Reviewers
Commits
Restricted Diffusion Commit
rP2b12f6160213: 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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable