(err error)
| 63 | } |
| 64 | |
| 65 | func (ef *termErrorFormatter) Format(err error) string { |
| 66 | switch err := err.(type) { |
| 67 | case RuntimeError: |
| 68 | return ef.formatRuntime(&err) |
| 69 | case errors.StaticError: |
| 70 | return ef.formatStatic(err) |
| 71 | default: |
| 72 | return ef.formatInternal(err) |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | func (ef *termErrorFormatter) formatRuntime(err *RuntimeError) string { |
| 77 | return err.Error() + "\n" + ef.buildStackTrace(err.StackTrace) |