From 0aa3a35f6481d4a083d0b3e6b6f473bb5b0ea24c Mon Sep 17 00:00:00 2001
From: "ezekiel.dohmen" <ezekiel.dohmen@ligo.org>
Date: Thu, 13 Jul 2023 10:25:09 -0700
Subject: [PATCH] Better error message, and fix ifo var if not capitalized

---
 src/epics/util/lib/Parameters.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/epics/util/lib/Parameters.pm b/src/epics/util/lib/Parameters.pm
index 3232b5b67..3d4d4b1a7 100644
--- a/src/epics/util/lib/Parameters.pm
+++ b/src/epics/util/lib/Parameters.pm
@@ -43,9 +43,12 @@ sub parseParams {
                 {
                     print "PARAM ifo set to $spp[1]\n";
                     $spp[1] =~ s/,/ /g;
+                    $spp[1] = uc($spp[1]); #Force the IFO to be caps
+
+                    #Make sure the ifo and filename match
                     if (lc($spp[1]) ne $::ifo_from_mdl_name) {
-                        $errmsg = "***ERROR: Model <ifo> name part does not match cdsParameters: ";
-                        $errmsg .= $::ifo . ", " . $spp[1] . "\n";
+                        $errmsg = "***ERROR: Model cdsParameter ifo= does not match filename (first two characters): ";
+                        $errmsg .=  "ifo=" . $spp[1] . ", filename[0:2]: ". $::ifo_from_mdl_name . "\n";
                         die $errmsg;
                     }
                     $::ifo = $spp[1];
-- 
GitLab