Navigation Menu

Skip to content

Commit

Permalink
[TIMOB-6457] - Exception message processing now returns an appropriat…
Browse files Browse the repository at this point in the history
…e error message even if the source isn't available

- Change C++-style 'throw' to Obj-C style '@throw'
  • Loading branch information
sptramer committed Dec 15, 2011
1 parent 37fd911 commit 781dc20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iphone/Classes/KrollContext.mm
Expand Up @@ -573,7 +573,8 @@ -(id)invokeWithResult:(KrollContext*)context
NSLog(@"[ERROR] Script Error = %@",[TiUtils exceptionMessage:excm]);
fflush(stderr);
TiStringRelease(js);
throw excm;

@throw excm;
}

TiStringRelease(js);
Expand Down
1 change: 1 addition & 0 deletions iphone/Classes/TiUtils.m
Expand Up @@ -1135,6 +1135,7 @@ +(NSString*)exceptionMessage:(id)arg
id lineNumber = [arg objectForKey:@"line"];
return [NSString stringWithFormat:@"%@ at %@ (line %@)",message,[source lastPathComponent],lineNumber];
}
return [NSString stringWithFormat:@"%@ (unknown file)", message];
}
}
return arg;
Expand Down

0 comments on commit 781dc20

Please sign in to comment.