From c9f0804056c177de81a2b7457b10e7e868da7af2 Mon Sep 17 00:00:00 2001
From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de>
Date: Tue, 8 Sep 2020 15:01:16 +0200
Subject: [PATCH] zaxisCreate_: improved error message.

---
 src/zaxis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/zaxis.c b/src/zaxis.c
index 08744bbbd..1b8200409 100644
--- a/src/zaxis.c
+++ b/src/zaxis.c
@@ -202,7 +202,7 @@ int zaxisCreate_(int zaxistype, int size, int id)
   zaxisptr->size = size;
 
   if ( zaxistype >= CDI_NumZaxistype || zaxistype < 0 )
-    Error("Internal problem! zaxistype > CDI_MaxZaxistype");
+    Error("Internal problem! zaxistype=%d out of range (min=0/max=%d)!", zaxistype, CDI_NumZaxistype-1);
 
   int zaxisID = zaxisptr->self;
   zaxisDefName(zaxisID, ZaxistypeEntry[zaxistype].name);
-- 
GitLab