--- loncom/interface/lonerrorhandler.pm 2001/12/19 17:17:46 1.3 +++ loncom/interface/lonerrorhandler.pm 2005/04/07 06:56:23 1.7 @@ -1,7 +1,7 @@ # The LearningOnline Network # Internal Server Error Handler # -# $Id: lonerrorhandler.pm,v 1.3 2001/12/19 17:17:46 albertel Exp $ +# $Id: lonerrorhandler.pm,v 1.7 2005/04/07 06:56:23 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -25,20 +25,17 @@ # # http://www.lon-capa.org/ # -# (Login Screen -# 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14, -# 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer) -# -# 3/1/1 Gerd Kortemeyer -# + package Apache::lonerrorhandler; use strict; use Apache::Constants qw(:common); +use Apache::loncommon; +use Apache::lonnet; sub handler { my $r = shift; - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; return OK if $r->header_only; @@ -46,7 +43,10 @@ sub handler { my $envkey; my $env=''; - foreach $envkey (sort keys %ENV) { + foreach $envkey (sort(keys(%env))) { + $env.="$envkey: $env{$envkey}\n"; + } + foreach $envkey (sort(keys(%ENV))) { $env.="$envkey: $ENV{$envkey}\n"; } @@ -54,18 +54,20 @@ sub handler { my $recipients=$r->dir_config('lonAdmEMail').','. $r->dir_config('lonSysEMail'); + my $version=$r->dir_config('lonVersion'); + my $req=$r->as_string(); $req=~s/\"/\'\'/g; + my $html=&Apache::lonxml::xmlbegin(); + my $bodytag=&Apache::loncommon::bodytag('Could Not Process Request'); # --------------------------------------------------- Print login screen header $r->print(< +$html The LearningOnline Network with CAPA - - -

Sorry!

+$bodytag

Somewhere something went wrong - please help us to find out what.

Please take a moment to fill out the form below. Your information, together with internal debugging information, will be emailed to the system and server @@ -81,6 +83,7 @@ administrators.

Do you have any guesses why this might have happened?

+