putting back the change from Ingy
Updating to add a test to check if the compilation fails as expected
updating the messages on throw to look more clearer