2002-03-06 23:13:23 +00:00
|
|
|
/** GSWExceptionPage.m - <title>GSWeb: Class GSWExceptionPage</title>
|
|
|
|
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-03-06 23:13:23 +00:00
|
|
|
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
2000-01-22 12:49:49 +00:00
|
|
|
Date: Apr 1999
|
|
|
|
|
2002-03-06 23:13:23 +00:00
|
|
|
$Revision$
|
|
|
|
$Date$
|
2000-01-22 12:49:49 +00:00
|
|
|
|
2002-03-06 23:13:23 +00:00
|
|
|
<abstract></abstract>
|
|
|
|
|
|
|
|
This file is part of the GNUstep Web Library.
|
|
|
|
|
|
|
|
<license>
|
2000-01-22 12:49:49 +00:00
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Library General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Library General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
2002-03-06 23:13:23 +00:00
|
|
|
</license>
|
|
|
|
**/
|
|
|
|
|
|
|
|
static char rcsId[] = "$Id$";
|
|
|
|
|
2000-10-30 15:36:50 +00:00
|
|
|
#include <GSWeb/GSWeb.h>
|
2000-01-22 12:49:49 +00:00
|
|
|
#include "GSWExceptionPage.h"
|
|
|
|
|
|
|
|
//===================================================================================
|
|
|
|
@implementation GSWExceptionPage
|
|
|
|
|
|
|
|
-(void)dealloc
|
|
|
|
{
|
|
|
|
GSWLogC("Dealloc GSWExceptionPage\n");
|
2002-03-06 23:13:23 +00:00
|
|
|
DESTROY(_exception);
|
2000-01-22 12:49:49 +00:00
|
|
|
GSWLogC("Dealloc GSWExceptionPage reasons\n");
|
2002-03-06 23:13:23 +00:00
|
|
|
DESTROY(_reasons);
|
2002-06-03 08:27:15 +00:00
|
|
|
GSWLogC("Dealloc GSWExceptionPage reference\n");
|
|
|
|
DESTROY(_reference);
|
2000-01-22 12:49:49 +00:00
|
|
|
GSWLogC("Dealloc GSWExceptionPage super\n");
|
|
|
|
[super dealloc];
|
|
|
|
GSWLogC("Dealloc GSWExceptionPage end\n");
|
|
|
|
};
|
|
|
|
|
|
|
|
-(void)awake
|
|
|
|
{
|
2002-06-03 08:27:15 +00:00
|
|
|
if (!_reference)
|
|
|
|
{
|
|
|
|
ASSIGN(_reference,[NSCalendarDate calendarDate]);
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
[super awake];
|
|
|
|
};
|
|
|
|
|
|
|
|
-(void)sleep
|
|
|
|
{
|
|
|
|
[super sleep];
|
|
|
|
};
|
|
|
|
|
|
|
|
-(NSArray*)getReasons
|
|
|
|
{
|
2002-03-06 23:13:23 +00:00
|
|
|
if (!_reasons)
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-03-06 23:13:23 +00:00
|
|
|
ASSIGN(_reasons,[[_exception reason] componentsSeparatedByString:@"\n"]);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
2002-03-06 23:13:23 +00:00
|
|
|
return _reasons;
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2002-03-06 23:13:23 +00:00
|
|
|
-(void)appendToResponse:(GSWResponse*)response
|
|
|
|
inContext:(GSWContext*)aContext
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-03-06 23:13:23 +00:00
|
|
|
[super appendToResponse:response
|
|
|
|
inContext:aContext];
|
|
|
|
[response disableClientCaching];
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2002-03-06 23:13:23 +00:00
|
|
|
-(void)setException:(NSException*)exception
|
2000-01-22 12:49:49 +00:00
|
|
|
{
|
2002-03-06 23:13:23 +00:00
|
|
|
ASSIGN(_exception,exception);
|
2000-01-22 12:49:49 +00:00
|
|
|
};
|
|
|
|
|
2002-01-26 10:43:23 +00:00
|
|
|
-(id)getTmpUserInfoValue
|
|
|
|
{
|
|
|
|
//If array, print it nicely
|
2002-03-06 23:13:23 +00:00
|
|
|
if ([_tmpUserInfoValue isKindOfClass:[NSArray class]])
|
|
|
|
return [(NSArray*)_tmpUserInfoValue componentsJoinedByString:@"\n"];
|
2002-01-26 10:43:23 +00:00
|
|
|
else
|
2002-03-06 23:13:23 +00:00
|
|
|
return _tmpUserInfoValue;
|
2002-01-26 10:43:23 +00:00
|
|
|
}
|
2002-06-03 08:27:15 +00:00
|
|
|
|
|
|
|
-(NSString*)referenceString
|
|
|
|
{
|
|
|
|
return _reference;
|
|
|
|
}
|
2000-01-22 12:49:49 +00:00
|
|
|
@end
|