Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Change some logging messages

  • Loading branch information...
commit 699de3c0490a7865c8591be389ef03c4a338e3de 1 parent 5560396
@b4winckler authored
View
6 src/MacVim/MMAppController.m
@@ -636,12 +636,12 @@ - (NSMenuItem *)appMenuItemTemplate
- (void)removeVimController:(id)controller
{
- ASLogDebug(@"Remove Vim controller pid=%d id=%d",
- [controller pid], [controller identifier]);
+ ASLogDebug(@"Remove Vim controller pid=%d id=%d (processingFlag=%d)",
+ [controller pid], [controller identifier], processingFlag);
int idx = [vimControllers indexOfObject:controller];
if (NSNotFound == idx) {
- ASLogWarn(@"Controller at index=%d not found", idx);
+ ASLogDebug(@"Controller not found, probably due to duplicate removal");
return;
}
View
32 src/MacVim/MMBackend.m
@@ -346,8 +346,8 @@ - (BOOL)checkin
identifier = [appProxy connectBackend:self pid:pid];
return YES;
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught when trying to connect backend: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"Connect backend failed: reason=%@", ex);
}
return NO;
@@ -510,8 +510,8 @@ - (void)flushQueue:(BOOL)force
debugStringForMessageQueue(outputQueue));
[appProxy processInput:outputQueue forIdentifier:identifier];
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"processInput:forIdentifer failed: reason=%@", ex);
if (![connection isValid]) {
ASLogNotice(@"Connection is invalid, exit now!");
ASLogDebug(@"waitForAck=%d got_int=%d", waitForAck, got_int);
@@ -579,8 +579,8 @@ - (void)exit
debugStringForMessageQueue(outputQueue));
[appProxy processInput:outputQueue forIdentifier:identifier];
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught when sending CloseWindowMsgID: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"CloseWindowMsgID send failed: reason=%@", ex);
}
// NOTE: If Cmd-w was pressed to close the window the menu is briefly
@@ -702,8 +702,8 @@ - (char *)browseForFileWithAttributes:(NSDictionary *)attr
[dialogReturn release]; dialogReturn = nil;
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"Exception: reason=%@", ex);
}
return (char *)s;
@@ -757,8 +757,8 @@ - (int)showDialogWithAttributes:(NSDictionary *)attr textField:(char *)txtfield
[dialogReturn release]; dialogReturn = nil;
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"Exception: reason=%@", ex);
}
return retval;
@@ -1320,8 +1320,8 @@ - (BOOL)sendToServer:(NSString *)name string:(NSString *)string
[proxy addInput:string client:self];
}
}
- @catch (NSException *e) {
- ASLogWarn(@"Caught exception: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"Exception: reason=%@", ex);
return NO;
}
@@ -1339,8 +1339,8 @@ - (NSArray *)serverList
@try {
list = [proxy serverList];
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught when listing servers: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"serverList failed: reason=%@", ex);
}
} else {
EMSG(_("E???: No connection to MacVim, server listing not possible."));
@@ -1409,8 +1409,8 @@ - (BOOL)sendReply:(NSString *)reply toPort:(int)port
[client addReply:reply server:self];
return YES;
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"addReply:server: failed: reason=%@", ex);
}
} else {
EMSG2(_("E???: server2client failed; no client with id 0x%x"), port);
View
28 src/MacVim/MMVimController.m
@@ -348,8 +348,9 @@ - (void)sendMessage:(int)msgid data:(NSData *)data
@try {
[backendProxy processInput:msgid data:data];
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught during DO call: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"processInput:data: failed: pid=%d id=%d msg=%s reason=%@",
+ pid, identifier, MessageStrings[msgid], ex);
}
}
@@ -378,8 +379,10 @@ - (BOOL)sendMessageNow:(int)msgid data:(NSData *)data
@try {
[backendProxy processInput:msgid data:data];
}
- @catch (NSException *e) {
+ @catch (NSException *ex) {
sendOk = NO;
+ ASLogNotice(@"processInput:data: failed: pid=%d id=%d msg=%s reason=%@",
+ pid, identifier, MessageStrings[msgid], ex);
}
@finally {
[conn setRequestTimeout:oldTimeout];
@@ -410,7 +413,8 @@ - (NSString *)evaluateVimExpression:(NSString *)expr
ASLogDebug(@"eval(%@)=%@", expr, eval);
}
@catch (NSException *ex) {
- ASLogWarn(@"Exception caught: %@", ex);
+ ASLogNotice(@"evaluateExpression: failed: pid=%d id=%d reason=%@",
+ pid, identifier, ex);
}
return eval;
@@ -426,7 +430,8 @@ - (id)evaluateVimExpressionCocoa:(NSString *)expr
errorString:errstr];
ASLogDebug(@"eval(%@)=%@", expr, eval);
} @catch (NSException *ex) {
- ASLogWarn(@"Exception caught: %@", ex);
+ ASLogNotice(@"evaluateExpressionCocoa: failed: pid=%d id=%d reason=%@",
+ pid, identifier, ex);
*errstr = [ex reason];
}
@@ -464,7 +469,7 @@ - (void)processInputQueue:(NSArray *)queue
[windowController processInputQueueDidFinish];
}
@catch (NSException *ex) {
- ASLogWarn(@"Caught exception (pid=%d): %@", pid, ex);
+ ASLogNotice(@"Exception: pid=%d id=%d reason=%@", pid, identifier, ex);
}
}
@@ -856,8 +861,8 @@ - (void)savePanelDidEnd:(NSSavePanel *)panel code:(int)code
[[NSDocumentController sharedDocumentController]
noteNewRecentFilePath:path];
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"Exception: pid=%d id=%d reason=%@", pid, identifier, ex);
}
@finally {
[conn setRequestTimeout:oldTimeout];
@@ -889,8 +894,9 @@ - (void)alertDidEnd:(MMAlert *)alert code:(int)code context:(void *)context
@try {
[backendProxy setDialogReturn:ret];
}
- @catch (NSException *e) {
- ASLogWarn(@"Exception caught: %@", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"setDialogReturn: failed: pid=%d id=%d reason=%@",
+ pid, identifier, ex);
}
}
@@ -1272,6 +1278,8 @@ - (void)connectionDidDie:(NSNotification *)notification
- (void)scheduleClose
{
+ ASLogDebug(@"pid=%d id=%d", pid, identifier);
+
// NOTE! This message can arrive at pretty much anytime, e.g. while
// the run loop is the 'event tracking' mode. This means that Cocoa may
// well be in the middle of processing some message while this message is
View
5 src/MacVim/MMWindowController.m
@@ -998,8 +998,9 @@ - (BOOL)askBackendForStarRegister:(NSPasteboard *)pb
@try {
reply = [backendProxy starRegisterToPasteboard:pb];
}
- @catch (NSException *e) {
- ASLogWarn(@"Caught exception: \"%@\"", e);
+ @catch (NSException *ex) {
+ ASLogNotice(@"starRegisterToPasteboard: failed: pid=%d reason=%@",
+ [vimController pid], ex);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.