lcdd/src
diff -u -r1.9 -r1.10
--- LCDDParser.cc 25 Jan 2008 23:16:56 -0000 1.9
+++ LCDDParser.cc 17 Jun 2008 23:16:17 -0000 1.10
@@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/LCDDParser.cc,v 1.9 2008/01/25 23:16:56 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/LCDDParser.cc,v 1.10 2008/06/17 23:16:17 jeremy Exp $
#include "LCDDParser.hh"
// lcdd
@@ -103,17 +103,17 @@
m_sxp.Run();
// get world volume from GDML
- m_world = (G4VPhysicalVolume*)GDMLProcessor::GetInstance()->GetWorldVolume();
-
- // die immediately if no world volume
- if (m_world == 0) {
- G4Exception("GDML failed to construct the world volume.");
+ try {
+ m_world = (G4VPhysicalVolume*)GDMLProcessor::GetInstance()->GetWorldVolume();
+ }
+ catch (std::exception& e) {
+ G4Exception("LCDD failed to create the world volume!");
}
// Setup magnetic field.
LCDDFieldManager::instance()->setup();
- // should only happen once
+ // This method should only be called once.
m_constructed = true;
}
else {