dmwm / PHEDEX

CMS data-placement suite
8 stars 18 forks source link

Improve error output in OracleConnectId #1094

Open nataliaratnikova opened 7 years ago

nataliaratnikova commented 7 years ago

The usage help shows section -db option as an optional parameter: `-sh-4.1$ OracleConnectId -help Generate Oracle SQL*Plus connect identifier from DBParam file.

Usage: OracleConnectId -db FILE[:SECTION] -sh-4.1$ `

However if section is defined in the FILE but omitted in the command line option, one will get a bunch of cryptic perl errors: -sh-4.1$ OracleConnectId -db ~/private/DMWMMON/DBParam.dmwmmon Use of uninitialized value in string eq at /cvmfs/cms.cern.ch/phedex/slc6_amd64_gcc493/cms/PHEDEX/4.2.1/perl_lib/PHEDEX/Core/DB.pm line 55, <DBCONF> line 2. Use of uninitialized value in string eq at /cvmfs/cms.cern.ch/phedex/slc6_amd64_gcc493/cms/PHEDEX/4.2.1/perl_lib/PHEDEX/Core/DB.pm line 55, <DBCONF> line 11. Use of uninitialized value in string eq at /cvmfs/cms.cern.ch/phedex/slc6_amd64_gcc493/cms/PHEDEX/4.2.1/perl_lib/PHEDEX/Core/DB.pm line 55, <DBCONF> line 20. Use of uninitialized value in string eq at /cvmfs/cms.cern.ch/phedex/slc6_amd64_gcc493/cms/PHEDEX/4.2.1/perl_lib/PHEDEX/Core/DB.pm line 55, <DBCONF> line 29. /afs/cern.ch/user/r/ratnik/private/DMWMMON/DBParam.dmwmmon: database parameters not found

It would be good to suppress the Core/DB.pm error output and explain the purpose of the section parameter in the usage help.