Commit 88447c332bf8d2c1b24e97215cc0743e6a0e2c8e

Authored by knodlseder
1 parent 2ce711e8

use has() method for checking the presence of columns

src/ctselect/ctselect.cpp
... ... @@ -586,34 +586,22 @@ std::string ctselect::check_infile(const std::string& filename) const
586 586 std::vector<std::string> missing;
587 587  
588 588 // Check for existence of TIME column
589   - try {
590   - GFitsTableCol* col = table->column("TIME");
591   - }
592   - catch (GException::fits_column_not_found& e) {
  589 + if (!table->has("TIME")) {
593 590 missing.push_back("TIME");
594 591 }
595 592  
596 593 // Check for existence of ENERGY column
597   - try {
598   - GFitsTableCol* col = table->column("ENERGY");
599   - }
600   - catch (GException::fits_column_not_found& e) {
  594 + if (!table->has("ENERGY")) {
601 595 missing.push_back("ENERGY");
602 596 }
603 597  
604 598 // Check for existence of RA column
605   - try {
606   - GFitsTableCol* col = table->column("RA");
607   - }
608   - catch (GException::fits_column_not_found& e) {
  599 + if (!table->has("RA")) {
609 600 missing.push_back("RA");
610 601 }
611 602  
612 603 // Check for existence of DEC column
613   - try {
614   - GFitsTableCol* col = table->column("DEC");
615   - }
616   - catch (GException::fits_column_not_found& e) {
  604 + if (!table->has("DEC")) {
617 605 missing.push_back("DEC");
618 606 }
619 607  
... ...
src/ctselect/ctselect.hpp
... ... @@ -33,7 +33,7 @@
33 33  
34 34 /* __Definitions _________________________________________________________ */
35 35 #define CTSELECT_NAME "ctselect"
36   -#define CTSELECT_VERSION "00-02-02"
  36 +#define CTSELECT_VERSION "00-02-03"
37 37  
38 38  
39 39 /***********************************************************************//**
... ...