Skip to content
Snippets Groups Projects
Commit 64fce4be authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

remove doc path from error msg

parent f535aa8b
Branches
Tags
No related merge requests found
......@@ -315,7 +315,13 @@
-(void)addError:(std::string)msg
{
AppDelegate *appDelegate = (AppDelegate *)[UIApplication sharedApplication].delegate;
[appDelegate->errors addObject:[Utils getStringFromCString:msg.c_str()]];
NSString *str = [Utils getStringFromCString:msg.c_str()];
// remove document path from error message
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docPath = [[paths objectAtIndex:0] stringByAppendingString:@"/"];
str = [str stringByReplacingOccurrencesOfString:docPath
withString:@""];
[appDelegate->errors addObject:str];
}
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment