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/src/G4TrajectoryDrawByAttribute.cc

    r1346 r1348  
    2424// ********************************************************************
    2525//
    26 // $Id: G4TrajectoryDrawByAttribute.cc,v 1.5 2010/05/28 02:00:59 allison Exp $
     26// $Id: G4TrajectoryDrawByAttribute.cc,v 1.6 2010/12/11 16:41:11 allison Exp $
    2727// GEANT4 tag $Name:  $
    2828//
     
    9797    // Expect definition to exist   
    9898    if (!G4AttUtils::ExtractAttDef(object, fAttName, attDef)) {
    99       std::ostringstream o;
    100       o <<"Unable to extract attribute definition named "<<fAttName;
    101       G4Exception
    102         ("G4TrajectoryDrawByAttribute::Draw", "InvalidAttributeDefinition", FatalErrorInArgument, o.str().c_str());
     99      static G4bool warnedUnableToExtract = false;
     100      if (!warnedUnableToExtract) {
     101        std::ostringstream o;
     102        o <<"Unable to extract attribute definition named "<<fAttName;
     103        G4Exception
     104          ("G4TrajectoryDrawByAttribute::Draw", "InvalidAttributeDefinition", JustWarning, o.str().c_str());
     105        G4cout << "Available attributes:\n"
     106               << object.GetAttDefs();
     107        warnedUnableToExtract = true;
     108      }
     109      return;
    103110    }
    104111   
     
    127134  // Expect value to exist
    128135  if (!G4AttUtils::ExtractAttValue(object, fAttName, attVal)) {
     136    static G4bool warnedUnableToExtract = false;
     137    if (!warnedUnableToExtract) {
    129138      std::ostringstream o;
    130139      o <<"Unable to extract attribute value named "<<fAttName;
    131140      G4Exception
    132         ("G4TrajectoryDrawByAttribute::Draw", "InvalidAttributeValue", FatalErrorInArgument, o.str().c_str());
     141        ("G4TrajectoryDrawByAttribute::Draw", "InvalidAttributeValue", JustWarning, o.str().c_str());
     142        G4cout << "Available attributes:\n"
     143               << object.GetAttDefs();
     144      warnedUnableToExtract = true;
     145    }
     146      return;
    133147  }
    134148 
Note: See TracChangeset for help on using the changeset viewer.