Fixed exit code for exceptions with error code 0
merged branch Stelian/2.2 (PR #8183)

This PR was submitted for the 2.2 branch but it was merged into the 2.1 branch instead (closes #8183).

Discussion
----------

Fixed exit code for exceptions with error code 0

Covers https://github.com/symfony/symfony/issues/8180

Commits
-------

48e77f8 Fixed exit code for exceptions with error code 0