Formats and panics an error message based on a token
(tok *token, msg string, args ...interface{})
| 27 | |
| 28 | // Formats and panics an error message based on a token |
| 29 | func (p *sshParser) raiseErrorf(tok *token, msg string, args ...interface{}) { |
| 30 | // TODO this format is ugly |
| 31 | panic(tok.Position.String() + ": " + fmt.Sprintf(msg, args...)) |
| 32 | } |
| 33 | |
| 34 | func (p *sshParser) raiseError(tok *token, err error) { |
| 35 | if err == ErrDepthExceeded { |
no test coverage detected