<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>Exceptions</TITLE>
</HEAD><BODY>
<H1>Exceptions</H1>

Message : <% $message |h %><p>
Exception :<br>
<pre>
<% $exception %>
<pre>

</BODY></HTML>

<%init>
    my $exception = undef;
    my $message = undef;

    try {
        my $sth = $dbh->prepare_cached(q{ SELECT * FROM tbl_person });
        $sth->execute();

        my $infos = $sth->fetchrow_hashref();
        $sth->finish();

    } catch Error::Simple with {
        my $E = shift;
        $exception = Data::Dumper->Dump([$E], [qw(E)]);
        if ($E =~ /ERROR:.*relation ".*" does not exist/) {
            $message = "message code : missing_table";
        } else {
            $message = $E->as_text();
        }
    };
</%init>
