I'm working on exception handling and I usually test it with causing a `DivideByZeroException`.

But this time **it's not thrown**. (While throwing a `System.Exception` works just like usual).

So I've created an **empty project** with only this script:

 void Update()
 {
 	if (Input.GetKeyDown(KeyCode.L))
 	{
 		Debug.Log("L");
 		var x = 0;
 		var y = 1 / x;
 	}
 	if (Input.GetKeyDown(KeyCode.P))
 	{
 		Debug.Log("P");
 		throw new System.Exception("test");
 	}
 }


And with the empty project the `DivideByZeroException` **is thrown**, so I had a look on the project configurations.

Turns out the new project's **Scripting Backend is Mono**.

Once I changed it from Mono to **IL2CPP**, the `DivideByZeroException` **is not thrown** in this project as well.

[![enter image description here][2]][2]

I experimented with changing the **API Compability Level**, but they **behave the same**.

[![enter image description here][1]][1]

So last time I debugged exception handling, I was on Mono and then I changed it ... I guess to make it faster or something.

My question is: **why is this the case?**


 [1]: https://i.sstatic.net/PzUXS.png
 [2]: https://i.sstatic.net/JIQnq.png