This repository has been archived on 2026-06-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
sgd/ysqld/ysql11d/fehler12.php
T

37 lines
743 B
PHP

<?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>