mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-24 04:01:16 +00:00
o fix in -takeValuesFromRequest:inContext: to avoid ecxception where
value is empty and formatter is date formatter git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18114 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3bd17c7667
commit
d786195ba3
1 changed files with 4 additions and 5 deletions
|
@ -85,7 +85,6 @@ RCS_ID("$Id$")
|
||||||
-(void)takeValuesFromRequest:(GSWRequest*)request
|
-(void)takeValuesFromRequest:(GSWRequest*)request
|
||||||
inContext:(GSWContext*)context
|
inContext:(GSWContext*)context
|
||||||
{
|
{
|
||||||
//OK
|
|
||||||
BOOL disabledValue=NO;
|
BOOL disabledValue=NO;
|
||||||
LOGObjectFnStartC("GSWTextField");
|
LOGObjectFnStartC("GSWTextField");
|
||||||
GSWStartElement(context);
|
GSWStartElement(context);
|
||||||
|
@ -98,11 +97,11 @@ RCS_ID("$Id$")
|
||||||
{
|
{
|
||||||
GSWComponent* component=[context component];
|
GSWComponent* component=[context component];
|
||||||
NSString* nameInContext=[self nameInContext:context];
|
NSString* nameInContext=[self nameInContext:context];
|
||||||
NSString* value=[request formValueForKey:nameInContext];
|
NSString* value=[request stringFormValueForKey:nameInContext];
|
||||||
id resultValue=nil;
|
id resultValue=nil;
|
||||||
NSDebugMLLog(@"gswdync",@"nameInContext=%@",nameInContext);
|
NSDebugMLLog(@"gswdync",@"nameInContext=%@",nameInContext);
|
||||||
NSDebugMLLog(@"gswdync",@"value=%@",value);
|
NSDebugMLLog(@"gswdync",@"value=%@",value);
|
||||||
if (value)
|
if ([value length]>0)
|
||||||
{
|
{
|
||||||
NSFormatter* formatter=[self formatterForComponent:component];
|
NSFormatter* formatter=[self formatterForComponent:component];
|
||||||
NSDebugMLLog(@"gswdync",@"formatter=%@",formatter);
|
NSDebugMLLog(@"gswdync",@"formatter=%@",formatter);
|
||||||
|
@ -125,8 +124,8 @@ RCS_ID("$Id$")
|
||||||
{
|
{
|
||||||
NSException* exception=nil;
|
NSException* exception=nil;
|
||||||
NSString* valueKeyPath=[_value keyPath];
|
NSString* valueKeyPath=[_value keyPath];
|
||||||
LOGException(@"EOValidationException resultValue=%@ valueKeyPath=%@",
|
LOGException(@"EOValidationException formatter=%@ value='%@' resultValue='%@' valueKeyPath=%@ error=%@",
|
||||||
resultValue,valueKeyPath);
|
formatter,value,resultValue,valueKeyPath,errorDscr);
|
||||||
exception=[NSException exceptionWithName:@"EOValidationException"
|
exception=[NSException exceptionWithName:@"EOValidationException"
|
||||||
reason:errorDscr /*_exceptionDscr*/
|
reason:errorDscr /*_exceptionDscr*/
|
||||||
userInfo:[NSDictionary
|
userInfo:[NSDictionary
|
||||||
|
|
Loading…
Reference in a new issue