Posts Tagged ‘throw in php’
throw Exception in php
Friday, October 31, 2008 9:52 No Commentstry { doExchange(); throw new Exception(“D’oh!”); echo “hai”; } catch (Exception $except) { logger.error(“doExchange failed”, e); } In that example, PHP enters the “try” block and starts executing code. When it hits the line “throw new Exception”, it will stop executing the “try” block, and jump to the “catch” block. Here it checks each exception [...]
