func parseError(res map[interface{}]interface{}) error {
	var err error
	var e string
	if v, ok := res["data"]; ok {
		e = v.(string)
	} else {
		// I don't know if we can get in this situation
		e = fmt.Sprintf("Failed to parse error %v", err)
		return errors.New(e)
	}
	// Search for non-existent depot error
	nodepot, err := regexp.Match(`must refer to client`, []byte(e))
	if err != nil {
		return err // Do we need to return (error, error) for real error and parsed one?
	}
	if nodepot {
		path := strings.Split(e, " - must")[0]
		return errors.New("P4Error -> No such area '" + path + "', please check your path")
	}
	err = fmt.Errorf("P4Error -> %s", e)
	return err
}
// parseError turns perforce error messages into go error's
parseError turns perforce error messages into go error's
// parseError turns perforce error messages into go error ' s
func parseError(res map[interface{}]interface{}) error {
	var err error
	var e string
	if v, ok := res["data"]; ok {
		e = v.(string)
	} else {
		e = fmt.Sprintf("Failed to parse error %v", err)
		return errors.New(e)
	}
	nodepot, err := regexp.Match(`must refer to client`, []byte(e))
	if err != nil {
		return err 
	}
	if nodepot {
		path := strings.Split(e, " - must")[0]
		return errors.New("P4Error -> No such area '" + path + "', please check your path")
	}
	err = fmt.Errorf("P4Error -> %s", e)
	return err
}
func parseError ( res map [ interface { } ] interface { } ) error { var err error var e string if v , ok := res [ " " ] ; ok { e = v . ( string ) } else { e = fmt . Sprintf ( " " , err ) return errors . New ( e ) } nodepot , err := regexp . Match ( `must refer to client` , [ ] byte ( e ) ) if err != nil { return err } if nodepot { path := strings . Split ( e , " " ) [ 0 ] return errors . New ( " " + path + " " ) } err = fmt . Errorf ( " " , e ) return err }
parseError turns perforce error messages into go error's
parseError turns perforce error messages into go error ' s
// I don't know if we can get in this situation // Search for non-existent depot error // Do we need to return (error, error) for real error and parsed one?