changeset 1355:67e8391ffc67

did: improve error message
author sam <sam@basx.dev>
date Sat, 26 Oct 2024 14:52:06 +0700
parents 8ad6e4cfcb2d
children 043746302874
files semicongine/image.nim
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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