ing
This commit is contained in:
		
							parent
							
								
									ec8c352d5f
								
							
						
					
					
						commit
						02c99d388e
					
				@ -16,5 +16,8 @@ type Error struct {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (e *Error) Error() string {
 | 
			
		||||
	if nil == e.Err {
 | 
			
		||||
		return ""
 | 
			
		||||
	}
 | 
			
		||||
	return e.Err.Error()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -39,6 +39,9 @@ func (rs *requestState) isCanceled() bool {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (rs *requestState) setError(err error) {
 | 
			
		||||
	if nil == err {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	rs.clientError = newError(rs.method, rs.params, err)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -29,7 +29,7 @@ func (crc *ClientResponseCodec) ID() interface{} {
 | 
			
		||||
 | 
			
		||||
func (crc *ClientResponseCodec) Result(result interface{}) error {
 | 
			
		||||
	if nil == crc.res.Error && nil != crc.res.Result {
 | 
			
		||||
		if err := json.Unmarshal(*crc.res.Result, result); nil != err {
 | 
			
		||||
		if err := json.Unmarshal(*crc.res.Result, &result); nil != err {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
		return nil
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user