// // P4ErrorCodes.cc // MBMenuExtra // // Created by Michael Bishop on 12/29/09. // Copyright 2009 Perforce Software. All rights reserved. // #include "P4ClientApi.h" #include "P4ErrorCodes.h" #include "error.h" #include "msgclient.h" extern const int kP4ErrorConnect = MsgClient::Connect.code; NSString * const P4MEErrorDomain = @"com.smibes.P4MenuExtra"; NSString * const kP4MEErrorP4PortKey = @"P4MEErrorP4Port"; NSString * const kP4MEErrorUserKey = @"P4MEErrorUser"; NSString * const kP4MEErrorClientKey = @"P4MEErrorClient"; NSString * const kP4MEErrorUnderlyingErrorsKey = @"P4MEErrorUnderlyingErrors"; NSString * const P4ServerConnectionReceivedErrorNotification = @"P4ServerConnectionReceivedErrorNotification"; NSString * const kP4ServerConnectionReceivedErrorNotificationResponseKey = @"Response"; NSString * const kP4ServerConnectionReceivedErrorNotificationContextKey = @"Context"; NSString * const kP4ServerConnectionReceivedErrorNotificationArgumentsKey = @"Arguments"; BOOL IsConnectionError( NSError * e ) { NSInteger code = [e code]; NSString * domain = [e domain]; if ( [domain isEqualToString:P4MEErrorDomain] ) { if ( code == kP4MEErrorCodeInvalidUser ) return YES; } if ( [domain isEqualToString:P4ErrorDomain] ) { if ( code == kP4ErrorCannotConnect ) return YES; if ( code == kP4ErrorInvalidPassword ) return YES; if ( code == kP4ErrorTimeout ) return YES; } return NO; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 20722 | jdputsch | initial branch, prep for -Zapp= support | ||
//guest/michael_bishop/MacMenu/src/P4API/p4objc/api/P4ErrorCodes.mm | |||||
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |