()
| 49 | } |
| 50 | |
| 51 | @Override |
| 52 | public String toString() { |
| 53 | RecognitionException re = (RecognitionException)cause; |
| 54 | int line = re.line; |
| 55 | int charPos = re.charPositionInLine; |
| 56 | if ( templateToken!=null ) { |
| 57 | int templateDelimiterSize = 1; |
| 58 | if ( templateToken.getType()==GroupParser.BIGSTRING ) { |
| 59 | templateDelimiterSize = 2; |
| 60 | } |
| 61 | line += templateToken.getLine()-1; |
| 62 | charPos += templateToken.getCharPositionInLine()+templateDelimiterSize; |
| 63 | } |
| 64 | |
| 65 | String filepos = line+":"+charPos; |
| 66 | if ( srcName!=null ) { |
| 67 | return srcName+" "+filepos+": "+String.format(error.message, msg); |
| 68 | } |
| 69 | return filepos+": "+String.format(error.message, msg); |
| 70 | } |
| 71 | } |
nothing calls this directly
no test coverage detected