<?php

$naam = '';
$message = false;
try {
    if (isset($_POST['submit'])) {
        if ($_POST['naam'] == '') {
            inception01();
        } else {
            $naam = $_POST['naam'];
        }
    }
} catch (Exception $e) {
    $message['type'] = 'error';
    $message['text'] = $e->getMessage();
}
function inception01()
{
    inception02();
}
function inception02()
{
    throw new Exception('Iets invullen aub!');
}
?>


<!doctype html>
<html>
<head>
    <meta charset="utf-8">
<?php

$naam = '';
$message = false;
try {
    if (isset($_POST['submit'])) {
        if ($_POST['naam'] == '') {
            throw new Exception(inception01());
        } else {
            $naam = $_POST['naam'];
        }
    }
} catch (Exception $e) {
    $message['type'] = 'error';
    $message['text'] = $e->getMessage();
}
function inception01()
{
    return inception02();
}
function inception02()
{
    return 'Iets invullen aub!';
}
?>


<!doctype html>
<html>
<head>
    <meta charset="utf-8">