summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2011-02-21 06:47:26 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2011-02-21 07:03:49 -0800
commitcb6e2ccf1e636ee709c709d68b379efe14540303 (patch)
tree01ecb355501cfd55b5240572b3b990e807496abd /MobileCydia.mm
parentff2d5dcd049f35ccfd2b60fb53a12e4095f9f158 (diff)
Commit separate errors during popErrorWithTitle:.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm10
1 files changed, 3 insertions, 7 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 2b8c772..888c43e 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -3388,29 +3388,25 @@ static NSString *Warning_;
- (bool) popErrorWithTitle:(NSString *)title {
bool fatal(false);
- std::string message;
while (!_error->empty()) {
std::string error;
bool warning(!_error->PopMessage(error));
if (!warning)
fatal = true;
+
for (;;) {
size_t size(error.size());
if (size == 0 || error[size - 1] != '\n')
break;
error.resize(size - 1);
}
+
lprintf("%c:[%s]\n", warning ? 'W' : 'E', error.c_str());
- if (!message.empty())
- message += "\n\n";
- message += error;
+ [delegate_ _setProgressError:[NSString stringWithUTF8String:error.c_str()] withTitle:[NSString stringWithFormat:Colon_, (warning ? Warning_ : Error_), title]];
}
- if (fatal && !message.empty())
- [delegate_ _setProgressError:[NSString stringWithUTF8String:message.c_str()] withTitle:[NSString stringWithFormat:Colon_, fatal ? Error_ : Warning_, title]];
-
return fatal;
}