From 10008133a9d0b5531daaa1b43dc24b2c7ecbc3f2 Mon Sep 17 00:00:00 2001
From: Bert Palm <bert.palm@ufz.de>
Date: Wed, 15 Apr 2020 03:42:50 +0200
Subject: [PATCH] improved itype warning text

---
 dios/lib.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/dios/lib.py b/dios/lib.py
index c901478..167f63c 100644
--- a/dios/lib.py
+++ b/dios/lib.py
@@ -283,13 +283,16 @@ dios_options = {
 
 
 def _throw_MixedItype_err_or_warn(itype):
-    msg = f"'{itype}'. Using a non-unique Itype for a DictOfSeries, is not recommend. " \
-          f"As soon as series \nwith different index types are inserted, selecting and slicing data will " \
-          f"almost always fail. You are hereby warned!"
+    msg = f"Using '{itype.name}' as itype is not recommend. " \
+          f"As soon as series with different index types are inserted,\n" \
+          f"indexing and slicing will almost always fail. "
+
     if dios_options[OptsFields.mixed_itype_warn_policy] in ['ignore', Opts.itype_ignore]:
         pass
     elif dios_options[OptsFields.mixed_itype_warn_policy] in ['error', 'err', Opts.itype_err]:
+        msg += "Suppress this error by specifying an unitary 'itype' or giving an 'index' to DictOfSeries."
         raise ItypeCastError(msg)
     else:
+        msg += "Silence this warning by specifying an unitary 'itype' or giving an 'index' to DictOfSeries."
         warnings.warn(msg, ItypeWarning)
     return
-- 
GitLab