Skip to content

Commit b88143a

Browse files
author
VendorMap
committed
increased error verbosity.
1 parent 2f2ddf3 commit b88143a

2 files changed

Lines changed: 737 additions & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function pixelmatch(img1, img2, output, width, height, options =
3333
if (img1.length !== img2.length || (output && output.length !== img1.length))
3434
throw new Error('Image sizes do not match.');
3535

36-
if (img1.length !== width * height * 4) throw new Error('Image data size does not match width/height.');
36+
if (img1.length !== width * height * 4) throw new Error('Image data size does not match width/height. Expecting ' + width * height * 4 + '. Got ' + img1.length);
3737

3838
// check if images are identical
3939
const len = width * height;

0 commit comments

Comments
 (0)