Skip to content
Browse files

Merge pull request #1014 from sptramer/timob-6457-18X

[TIMOB-6457][1_8_X] Fix bad errors/crash in require() [and maybe callbacks, too]
  • Loading branch information...
2 parents e6517e7 + 781dc20 commit c44f56360bfdfda6e077edd87575936731bb67dd @vishalduggal vishalduggal committed
Showing with 3 additions and 1 deletion.
  1. +2 −1 iphone/Classes/KrollContext.mm
  2. +1 −0 iphone/Classes/TiUtils.m
View
3 iphone/Classes/KrollContext.mm
@@ -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);
View
1 iphone/Classes/TiUtils.m
@@ -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;

0 comments on commit c44f563

Please sign in to comment.
Something went wrong with that request. Please try again.