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
F19802063: D11426.id27461.diff
Sun, Mar 1, 12:55 PM
F19710478: D11426.id27461.diff
Wed, Feb 11, 4:46 PM
F19280182: D11426.id27451.diff
Dec 23 2025, 3:05 AM
F19099415: D11426.id27451.diff
Dec 4 2025, 8:01 PM
F19032777: D11426.id.diff
Nov 25 2025, 7:24 AM
F18977412: D11426.id.diff
Nov 16 2025, 5:50 PM
F18904450: D11426.id.diff
Nov 8 2025, 9:19 AM
F18835080: D11426.diff
Oct 26 2025, 1:13 PM
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