IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26413


Ignore:
Timestamp:
Dec 15, 2009, 6:07:32 PM (16 years ago)
Author:
eugene
Message:

add status to psMetadataItemSupplement so errors may be optional

Location:
branches/eam_branches/20091201/psLib/src/types
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psLib/src/types/psMetadata.c

    r25383 r26413  
    622622
    623623// may need to extend this to change the keyname in the copy
    624 bool psMetadataItemSupplement(psMetadata *out,
     624bool psMetadataItemSupplement(bool *status,
     625                              psMetadata *out,
    625626                              const psMetadata *in,
    626627                              const char *key)
     
    632633    psMetadataItem *item = psMetadataLookup(in, key);
    633634    if (!item) {
    634         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Could not find '%s' in metadata.\n", key);
     635        if (status) {
     636            *status = false;
     637        } else {
     638            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Could not find '%s' in metadata.\n", key);
     639        }
    635640        return false;
    636641    }
  • branches/eam_branches/20091201/psLib/src/types/psMetadata.h

    r25383 r26413  
    545545 */
    546546bool psMetadataItemSupplement(
     547    bool *status,                       ///< if supplied, returns true/false if key is found (suppresses the error)
    547548    psMetadata *out,                   ///< output Metadata container for copying.
    548549    const psMetadata *in,              ///< Metadata collection from which to copy.
Note: See TracChangeset for help on using the changeset viewer.