MCPcopy
hub / github.com/zxing-js/library / decodeInternal

Method decodeInternal

src/core/MultiFormatReader.ts:187–209  ·  view source on GitHub ↗

* @throws NotFoundException

(image: BinaryBitmap)

Source from the content-addressed store, hash-verified

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}

Callers 2

decodeMethod · 0.95
decodeWithStateMethod · 0.95

Calls 1

decodeMethod · 0.65

Tested by

no test coverage detected