mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-02 00:43:35 +00:00
Fixed: some error handling needed improving.
- Added ~/narwhal/bin to executable paths. - Hopefully clearer error message when an executable is missing. - Log PATH when executable is missing. - Catch parse exceptions when parsing parser.j errors, log the returned text.
This commit is contained in:
@@ -138,19 +138,26 @@
|
||||
{
|
||||
notificationTitle = [(status == XCCStatusCodeError ? @"Error" : @"Warning") stringByAppendingString:@" parsing Objective-J source"];
|
||||
|
||||
NSArray *errors = [response propertyList];
|
||||
|
||||
for (NSDictionary *error in errors)
|
||||
@try
|
||||
{
|
||||
NSMutableDictionary *info = [error mutableCopy];
|
||||
info[@"projectId"] = self.projectId;
|
||||
info[@"message"] = [NSString stringWithFormat:@"%@, line %d\n%@", [error[@"path"] lastPathComponent], [error[@"line"] intValue], error[@"message"]];
|
||||
info[@"status"] = taskResult[@"status"];
|
||||
NSArray *errors = [response propertyList];
|
||||
|
||||
if (self.isCancelled)
|
||||
return;
|
||||
|
||||
[center postNotificationName:XCCConversionDidGenerateErrorNotification object:self userInfo:info];
|
||||
for (NSDictionary *error in errors)
|
||||
{
|
||||
NSMutableDictionary *info = [error mutableCopy];
|
||||
info[@"projectId"] = self.projectId;
|
||||
info[@"message"] = [NSString stringWithFormat:@"%@, line %d\n%@", [error[@"path"] lastPathComponent], [error[@"line"] intValue], error[@"message"]];
|
||||
info[@"status"] = taskResult[@"status"];
|
||||
|
||||
if (self.isCancelled)
|
||||
return;
|
||||
|
||||
[center postNotificationName:XCCConversionDidGenerateErrorNotification object:self userInfo:info];
|
||||
}
|
||||
}
|
||||
@catch (NSException *exception)
|
||||
{
|
||||
DDLogError(@"%@\n%@", exception.reason, response);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user