(err error)
| 346 | } |
| 347 | |
| 348 | func canvasResultError(err error) error { |
| 349 | if err == nil { |
| 350 | return nil |
| 351 | } |
| 352 | if rpcErr, ok := err.(*jsonrpc2.Error); ok { |
| 353 | return rpcErr |
| 354 | } |
| 355 | if cerr, ok := err.(*CanvasError); ok { |
| 356 | return canvasJSONRPCError(cerr) |
| 357 | } |
| 358 | return canvasJSONRPCError(NewCanvasError("canvas_handler_error", err.Error())) |
| 359 | } |
| 360 | |
| 361 | // newSession creates a new session wrapper with the given session ID and client. |
| 362 | func newSession(sessionID string, client *jsonrpc2.Client, workspacePath string) *Session { |
no test coverage detected
searching dependent graphs…