Added exception for throwing when non-void function is called beyond allowance