NewErrorInfo creates a new ErrorInfo.
(operation, operationDetails string, startTime, endTime time.Time, err error)
| 39 | |
| 40 | // NewErrorInfo creates a new ErrorInfo. |
| 41 | func NewErrorInfo(operation, operationDetails string, startTime, endTime time.Time, err error) *ErrorInfo { |
| 42 | return &ErrorInfo{ |
| 43 | Operation: operation, |
| 44 | OperationDetails: operationDetails, |
| 45 | StartTime: startTime, |
| 46 | EndTime: endTime, |
| 47 | ErrorMessage: fmt.Sprintf("%v", err), |
| 48 | ErrorDetails: fmt.Sprintf("%+v", err), |
| 49 | } |
| 50 | } |
no outgoing calls