IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 20981


Ignore:
Timestamp:
Dec 14, 2008, 11:49:59 AM (17 years ago)
Author:
eugene
Message:

add error check for load functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/src/dvo_catalog.c

    r20936 r20981  
    259259    case DVO_MODE_RAW:
    260260      if (VERBOSE) fprintf (stderr, "reading catalog (mode DVO_MODE_RAW)\n");
    261       dvo_catalog_load_raw (catalog, VERBOSE);
     261      if (!dvo_catalog_load_raw (catalog, VERBOSE)) {
     262        if (VERBOSE) fprintf (stderr, "failed to load RAW catalog file %s\n", catalog[0].filename);
     263        return (FALSE);
     264      }
    262265      break;
    263266    case DVO_MODE_MEF:
    264267      if (VERBOSE) fprintf (stderr, "reading catalog (mode DVO_MODE_MEF)\n");
    265       dvo_catalog_load_mef (catalog, VERBOSE);
     268      if (!dvo_catalog_load_mef (catalog, VERBOSE)) {
     269        if (VERBOSE) fprintf (stderr, "failed to load MEF catalog file %s\n", catalog[0].filename);
     270        return (FALSE);
     271      }
    266272      break;
    267273    case DVO_MODE_SPLIT:
    268274      if (VERBOSE) fprintf (stderr, "reading catalog (mode DVO_MODE_SPLIT)\n");
    269       dvo_catalog_load_split (catalog, VERBOSE);
     275      if (!dvo_catalog_load_split (catalog, VERBOSE)) {
     276        if (VERBOSE) fprintf (stderr, "failed to load SPLIT catalog file %s\n", catalog[0].filename);
     277        return (FALSE);
     278      }
    270279      break;
    271280    default:
Note: See TracChangeset for help on using the changeset viewer.