diff options
author | Pierre de La Morinerie <kemenaran@gmail.com> | 2018-02-02 23:24:14 +0530 |
---|---|---|
committer | Chris <ccbrown112@gmail.com> | 2018-02-02 11:54:14 -0600 |
commit | 07902b4c91ac80042df5585e25ce60a5078016bd (patch) | |
tree | 27b10f47c1ad51303652c744c60a1f33799f5ae5 /tests | |
parent | 2256e23c9ef7295b0001b1723be491254bfe73fe (diff) | |
download | chat-07902b4c91ac80042df5585e25ce60a5078016bd.tar.gz chat-07902b4c91ac80042df5585e25ce60a5078016bd.tar.bz2 chat-07902b4c91ac80042df5585e25ce60a5078016bd.zip |
report server launch errors (#8189)
When starting the server using `platform server`, errors occuring during
startup are not reported in the console. The command exit with a 0 exit
code (i.e. "success"), although the server failed to launch.
With this change, when an error occurs while initializing the app (like
a missing or invalid configuration file):
- the error is printed to the console;
- the command exit with a "-1" exit code.
This allow shell scripts to properly detect the startup failure, and to
react to it.
Example of error displayed:
```
$ platform server
Error: LoadConfig: Error decoding config file=config.json, err=While parsing config: invalid character ':' after top-level value,
``
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions