PHP/Statement/throw

Материал из Web эксперт
Перейти к: навигация, поиск

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>