Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: ts_middleware
-
Labels:None
-
Story Points:0.5
-
Epic Link:
-
Sprint:TSSW Sprint - Sep 27 - Oct 11
-
Team:Telescope and Site
-
Urgent?:No
Description
Please check that getenv returns non-null. If that returns null, string exception is raised and that is quite hard to debug if you are catching this exception.
Attachments
Issue Links
- is cloned by
-
CAP-806 Please tests if OSPL_RELEASE env variable exists
-
- Done
-
This is one possible solution:
diff --git a/lsstsal/scripts/gensalgetput.tcl b/lsstsal/scripts/gensalgetput.tcl
--- a/lsstsal/scripts/gensalgetput.tcl
+++ b/lsstsal/scripts/gensalgetput.tcl
string SAL_SALData::getOSPLVersion()
\{
- string osplver = getenv(\"OSPL_RELEASE\");
+ cerr << \"Please define OSPL_RELEASE environment variable!\" << endl;
+ exit(EXIT_FAILURE);
+ }
\}
"
}