- Timestamp:
- Jan 5, 2011, 12:19:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/modeling/src/G4TrajectoryDrawByAttribute.cc
r1346 r1348 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawByAttribute.cc,v 1. 5 2010/05/28 02:00:59allison Exp $26 // $Id: G4TrajectoryDrawByAttribute.cc,v 1.6 2010/12/11 16:41:11 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 97 97 // Expect definition to exist 98 98 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; 103 110 } 104 111 … … 127 134 // Expect value to exist 128 135 if (!G4AttUtils::ExtractAttValue(object, fAttName, attVal)) { 136 static G4bool warnedUnableToExtract = false; 137 if (!warnedUnableToExtract) { 129 138 std::ostringstream o; 130 139 o <<"Unable to extract attribute value named "<<fAttName; 131 140 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; 133 147 } 134 148
Note: See TracChangeset
for help on using the changeset viewer.