PHP/Statement/throw
Throwing an Exception
<source lang="html4strict">
<?php
class ThrowExample { public function makeError() { throw new Exception("This is an example Exception"); } } $inst = new ThrowExample(); $inst->makeError();
?>
</source>
<source lang="html4strict">
<?php
class ThrowExample { public function makeError() { throw new Exception("This is an example Exception"); } } $inst = new ThrowExample(); $inst->makeError();
?>
</source>