Index: /fact/tools/rootmacros/fits.h
===================================================================
--- /fact/tools/rootmacros/fits.h	(revision 12578)
+++ /fact/tools/rootmacros/fits.h	(revision 12579)
@@ -372,4 +372,18 @@
         {
             const Columns::const_iterator it = cols.find(key);
+            if (it==cols.end()){
+                ostringstream str;
+                str << "Key '" << key << "' not found." << endl;
+                str << "Possible keys are:" << endl;
+                for ( Columns::const_iterator it=cols.begin() ; it != cols.end(); ++it){
+                    str << it->first << endl;
+                }
+#ifdef __EXCEPTIONS
+                throw runtime_error(str.str());
+#else
+                gLog << ___err___ << "ERROR - " << str.str() << endl;
+                return 0;
+#endif
+            }
             return it==cols.end() ? 0 : it->second.num;
         }
