Question: Inspired by [this default for IO](http://meta.codegolf.stackexchange.com/a/5330/44713).

The Task
--------

Write a program that, given an input integer `x` between 0 and 255, crashes with exit code `x`.

Restrictions
------------

* You may not call anything which is intended directly for exit code output (`System.exit(x)`, returning from `main`, etc.). Instead, your program must cause an error or crash which will cause, with a probability of 1, the program to exit with the input integer.
	+ In this case, the words "error" and "crash" means that the program caused some fatal unintended exception, wherein a method, operation or otherwise was used incorrectly that caused an irreversible failure.
	+ You may not directly cause the error by throwing it directly. You must cause it by using a method, function, or otherwise whose purpose serves a different function (i.e. attempting to execute a file write to a read-only directory).
* You must have at least two exit codes accounted for in your program.
* Termination of the process with the use of signals is banned. (Reasoning may be found [in this discussion](http://chat.stackexchange.com/transcript/message/34843663#34843663))

Scoring
-------

Your program's score is determined by the number of supported exit codes, where code concision is tiebreaker. The greatest number of supported exit codes wins!

Answer: 
Bash 4.2 + extras, 24 exit codes
================================

```bash
grep \#$1$ $0|sed 's:#.*::;s:T:tcc -run -<<<main=:;s:C:curl -L x.org/! :'|sh;exit
man#1
C-#2
C/#3
sed#4
C-x/#5
C_#6
C0#7
man /#16
C-f#22
C-o/#23
C-L3#35
C--capath /#60
C--max-filesize 1#63
C--cacert /#77
timeout 1e-9 w#124
/#126
-#127
T6\;#132
T204\;#133
$[2**63%-1]#136
{0..1000000000}#137
T0\;#139
exit _#255

```

*Thanks to @KenY-N for 3 exit codes. Thanks to @el.pescado for 1 exit code.*

### Verification

All tests have been performed on openSUSE 13.2.

```bash
$ for n in {0..255}; do bash exit.sh $n; (($? == $n)) && echo $n >&0; done &> /dev/null
0
1
2
3
4
6
7
16
22
23
35
60
63
77
124
126
127
132
133
136
137
139
255

```
Turtlèd, 4 bytes, 2 exit codes
==============================

I don't know if there are any ways to get more exit codes... are there even any more ways in the interpreter language

I found a few four length answers

```
' ?;

```

[Try it online!](https://tio.run/nexus/turtled#@6@uYG/9/78hAA "Turtlèd – TIO Nexus")

```
!.(0

```

[Try it online!](https://tio.run/nexus/turtled#@6@op2Hw/78hAA "Turtlèd – TIO Nexus")

```
?;(*

```

[Try it online!](https://tio.run/nexus/turtled#@6@op2Hw/78hAA "Turtlèd – TIO Nexus")

How these work:
---------------

```
' ?;

```

in my interpreter, there is a ~~bug~~ feature that causes errors when the grid in memory has more than one line, and has no non-space characters on it. this program erases the \* on the origin cell `'[space]`, takes non-negative integer input `?` (0 or 1 really), and moves down that many `;`, if it is zero, the grid will only have one line and not error, otherwise it will move down and the error will occur

```
!.(0

```

parentheses and stuff don't get parsed, they just get executed at run time to mean: "skip to the matching paren, if the cell symbol isn't right". in this program, inputting (`!`) one causes the program to write it to the cell (`.`), execute the paren, which checks if the cell symbol is 0, try to skip to the matching paren, but instead throw an error as there is none. if it is zero, it writes it down, checks the parentheses, finds itself on a 0, and then ignores it, and the program finishes

```
?;(*

```

has elements of the previous answer, and the first. it takes non-negative integer input, moves down that many, and checks whether the cell is '\*', searching for a non existing extra paren if it is not. if the input is 1, it will move off the starting space, and find the cell is a space, and error, if it is zero, it will stay on the start space and ignore the paren.