()
| 336 | } |
| 337 | |
| 338 | func (t TraceableError) String() string { |
| 339 | var errorString strings.Builder |
| 340 | if t.location != "" { |
| 341 | _, _ = fmt.Fprintf(&errorString, "%s\n ", t.location) |
| 342 | } |
| 343 | if t.executedFunction != "" { |
| 344 | _, _ = fmt.Fprintf(&errorString, "%s\n ", t.executedFunction) |
| 345 | } |
| 346 | if t.message != "" { |
| 347 | _, _ = fmt.Fprintf(&errorString, "%s\n", t.message) |
| 348 | } |
| 349 | return errorString.String() |
| 350 | } |
| 351 | |
| 352 | // parseTemplateExecErrorString parses a template execution error string from text/template |
| 353 | // without using regular expressions. It returns a TraceableError and true if parsing succeeded. |
no outgoing calls