[Console] Ensure proper exit code on Exception

Fixes broken exit codes for console component.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| New test cases?   | yes
| Tests pass?   | yes
| Fixed tickets | 8183, 8202
| License       | MIT

- Prevent negative and 0 exit code from being used on exception
- Prevent 255+ exit code from being used