Mega Code Archive

 
Categories / Php / Statement
 

Throwing an Exception

<?php      class ThrowExample {           public function makeError() {                throw new Exception("This is an example Exception");           }      }      $inst = new ThrowExample();      $inst->makeError(); ?>