<?php
class MeineException1 extends Exception {}

class MeineException2 extends Exception {}

if (isset($_GET['a'])) {

    $a = $_GET['a'];

    try {
        if ($a == 0) {
            throw new Exception("<hr>Standardausnahme<hr>");
        } else if ($a < 0) {
            throw new MeineException1("<hr>Klein<hr>");
        } else {
            throw new MeineException2("<hr>Gross<hr>");
        }

        } catch(MeineException1 $e) {
            echo($e -> getFile());
        } catch(MeineException2 $e) {
            echo($e -> getLine());
        } catch(Exception $e) {
            echo($e -> getMessage());
        }

}

?>

<form >

Wert : <input name="a"><br>

<input type="submit">

</form>