--- trunk/lib/Frey/Server.pm 2008/07/08 16:18:13 64 +++ trunk/lib/Frey/Server.pm 2008/07/09 12:08:07 66 @@ -42,15 +42,27 @@ warn $req->request->header('User_Agent'); #warn dump( $req ); - if ( $path =~ m!/~/([^/]+)(?:/([^/]*))?! ) { - my $f = Frey::Introspect->new( package => $1 ); - $f->html( $req ); - } + eval { + + if ( $path =~ m!/~/([^/]+)(?:/([^/]*))?! ) { + my $f = Frey::Introspect->new( package => $1 ); + $f->html( $req ); + } + + if ( $path =~ m!/ob/([^/]+)(?:/([^/]*))?! ) { + my $f = Frey::ObjectBrowser->new; + $f->html( $req ); + } - if ( $path =~ m!/ob/([^/]+)(?:/([^/]*))?! ) { - my $f = Frey::ObjectBrowser->new; - $f->html( $req ); + }; + + if ( $@ ) { + warn $@; + #$req->conn->send_error( 404 ); # FIXME this should probably be 500, but we can't ship page with it + $req->print( qq{
$@
} );
+		$req->next;
 	}
+
 	# If this is a request for the pushtream, then give them that
 	if($path =~ /pushstream/) {
 		pushstream($req);