Ignore:
Timestamp:
Jan 5, 2011, 12:19:12 PM (13 years ago)
Author:
garnier
Message:

update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/modeling/include/G4AttributeFilterT.hh

    r1346 r1348  
    2424// ********************************************************************
    2525//
    26 // $Id: G4AttributeFilterT.hh,v 1.6 2006/12/13 15:50:02 gunter Exp $
     26// $Id: G4AttributeFilterT.hh,v 1.7 2010/12/11 16:41:11 allison Exp $
    2727// GEANT4 tag $Name:  $
    2828//
     
    128128    // Expect definition to exist   
    129129    if (!G4AttUtils::ExtractAttDef(object, fAttName, attDef)) {
    130       std::ostringstream o;
    131       o <<"Unable to extract attribute definition named "<<fAttName;
    132       G4Exception
    133         ("G4AttributeFilterT::Evaluate", "InvalidAttributeDefinition", FatalErrorInArgument, o.str().c_str());
     130      static G4bool warnedUnableToExtract = false;
     131      if (!warnedUnableToExtract) {
     132        std::ostringstream o;
     133        o <<"Unable to extract attribute definition named "<<fAttName;
     134        G4Exception
     135          ("G4AttributeFilterT::Evaluate", "InvalidAttributeDefinition", JustWarning, o.str().c_str());
     136        G4cout << "Available attributes:\n"
     137               << object.GetAttDefs();
     138        warnedUnableToExtract = true;
     139      }
     140      return false;
    134141    }
    135142   
     
    152159  // Expect value to exist
    153160  if (!G4AttUtils::ExtractAttValue(object, fAttName, attVal)) {
    154     std::ostringstream o;
    155     o <<"Unable to extract attribute value named "<<fAttName;
    156     G4Exception
    157       ("G4AttributeFilterT::Evaluate", "InvalidAttributeValue", FatalErrorInArgument, o.str().c_str());
     161    static G4bool warnedUnableToExtract = false;
     162    if (!warnedUnableToExtract) {
     163      std::ostringstream o;
     164      o <<"Unable to extract attribute value named "<<fAttName;
     165      G4Exception
     166        ("G4AttributeFilterT::Evaluate", "InvalidAttributeValue", JustWarning, o.str().c_str());
     167    }
     168    G4cout << "Available attributes:\n"
     169           << object.GetAttDefs();
     170    warnedUnableToExtract = true;
     171    return false;
    158172  }
    159173
Note: See TracChangeset for help on using the changeset viewer.