# HG changeset patch # User sam # Date 1729929126 -25200 # Node ID 67e8391ffc67966fec362bd0238101d6c501c1ec # Parent 8ad6e4cfcb2d42d607d9a0e9feebd6d0fd0d737e did: improve error message diff -r 8ad6e4cfcb2d -r 67e8391ffc67 semicongine/image.nim --- a/semicongine/image.nim Fri Sep 27 23:45:13 2024 +0700 +++ b/semicongine/image.nim Sat Oct 26 14:52:06 2024 +0700 @@ -107,9 +107,9 @@ proc addImage*[T: PixelType](imageArray: var ImageArray[T], image: sink Image[T]) = assert image.width == imageArray.width, - "Image needs to have same dimension as ImageArray to be added" + &"Image needs to have same dimension as ImageArray to be added (array has {imageArray.width}x{imageArray.height} but image has {image.width}x{image.height})" assert image.height == imageArray.height, - "Image needs to have same dimension as ImageArray to be added" + &"Image needs to have same dimension as ImageArray to be added (array has {imageArray.width}x{imageArray.height} but image has {image.width}x{image.height})" inc imageArray.nLayers imageArray.data.add image.data