(invokeResponseError *messages.InvokeResponse_Error)
| 186 | } |
| 187 | |
| 188 | func makeXRayError(invokeResponseError *messages.InvokeResponse_Error) *xrayError { |
| 189 | paths := make([]string, 0, len(invokeResponseError.StackTrace)) |
| 190 | visitedPaths := make(map[string]struct{}, len(invokeResponseError.StackTrace)) |
| 191 | for _, frame := range invokeResponseError.StackTrace { |
| 192 | if _, exists := visitedPaths[frame.Path]; !exists { |
| 193 | visitedPaths[frame.Path] = struct{}{} |
| 194 | paths = append(paths, frame.Path) |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | cwd, _ := os.Getwd() |
| 199 | exceptions := []xrayException{{ |
| 200 | Type: invokeResponseError.Type, |
| 201 | Message: invokeResponseError.Message, |
| 202 | Stack: invokeResponseError.StackTrace, |
| 203 | }} |
| 204 | if exceptions[0].Stack == nil { |
| 205 | exceptions[0].Stack = []*messages.InvokeResponse_Error_StackFrame{} |
| 206 | } |
| 207 | return &xrayError{ |
| 208 | WorkingDirectory: cwd, |
| 209 | Paths: paths, |
| 210 | Exceptions: exceptions, |
| 211 | } |
| 212 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…