* @throws NotFoundException
(image: BinaryBitmap)
| 185 | * @throws NotFoundException |
| 186 | */ |
| 187 | private decodeInternal(image: BinaryBitmap): Result { |
| 188 | |
| 189 | if (this.readers === null) { |
| 190 | throw new ReaderException('No readers where selected, nothing can be read.'); |
| 191 | } |
| 192 | |
| 193 | for (const reader of this.readers) { |
| 194 | |
| 195 | try { |
| 196 | return reader.decode(image, this.hints); |
| 197 | } catch (ex) { |
| 198 | if (ex instanceof ReaderException) { |
| 199 | continue; |
| 200 | } |
| 201 | |
| 202 | // Log non-reader exceptions for debugging but continue trying other readers |
| 203 | console.warn('MultiFormatReader: non-ReaderException from reader:', ex); |
| 204 | continue; |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | throw new NotFoundException('No MultiFormat Readers were able to detect the code.'); |
| 209 | } |
| 210 | |
| 211 | } |
no test coverage detected