(messageFormat: string, ...values)
| 170 | } |
| 171 | |
| 172 | throwError(messageFormat: string, ...values): void { |
| 173 | const args = Array.prototype.slice.call(arguments, 1); |
| 174 | const msg = messageFormat.replace(/%(\d)/g, (whole, idx) => { |
| 175 | assert(idx < args.length, 'Message reference must be in range'); |
| 176 | return args[idx]; |
| 177 | } |
| 178 | ); |
| 179 | |
| 180 | const index = this.lastMarker.index; |
| 181 | const line = this.lastMarker.line; |
| 182 | const column = this.lastMarker.column + 1; |
| 183 | throw this.errorHandler.createError(index, line, column, msg); |
| 184 | } |
| 185 | |
| 186 | tolerateError(messageFormat, ...values) { |
| 187 | const args = Array.prototype.slice.call(arguments, 1); |
no test coverage detected