Changeset 617 for trunk/Cocoa


Ignore:
Timestamp:
03/02/10 08:03:10 (15 years ago)
Author:
Nicholas Riley
Message:

Don't die if Date::Manip fails to parse a date.

Location:
trunk/Cocoa/Pester/Source
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/Manip.pm

    r463 r617  
    36453645  }
    36463646
    3647   confess "ERROR: Date::Manip unable to determine Time Zone.\n";
     3647  confess "ERROR: Date::Manip unable to determine Time Zone from @tz.\n";
    36483648}
    36493649
  • trunk/Cocoa/Pester/Source/ParseDate.m

    r367 r617  
    4242    }
    4343   
    44     NSString *temp = [[NSString alloc] initWithFormat: @"UnixDate(q|%@|, '%%q')", input];
     44    NSString *temp = [[NSString alloc] initWithFormat: @"my $s = eval {UnixDate(q|%@|, '%%q')}; warn $@ if $@; $s", input];
    4545    // NSLog(@"%@", temp);
    46     SV *d = eval_pv([temp UTF8String], TRUE);
     46    SV *d = eval_pv([temp UTF8String], FALSE);
    4747    [temp release];
    4848    if (d == NULL) return nil;
Note: See TracChangeset for help on using the changeset viewer.