#!/usr/local/bin/perl -wT
#A generic error routine. This file should be <i>required</i> in another script.
#noexec

use strict;

sub error {
    my( $q, $error_message, $partial ) = @_;
    
    if (! $partial) {
	print 
	    $q->header( "text/html" ),
	    $q->start_html( "Error" );
    }
    print 
	$q->h1( "Error" ),
	$q->p( "Sorry, the following error has occurred: " ),
	$q->p( $q->i( $error_message ) ),
	$q->end_html;
    exit;
}
