Print

Print


Commit in GeomConverter/src/org/lcsim/detector on MAIN
LogicalVolume.java+7-11.4 -> 1.5
JM: add error check of all ctor args

GeomConverter/src/org/lcsim/detector
LogicalVolume.java 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- LogicalVolume.java	10 Oct 2007 22:35:44 -0000	1.4
+++ LogicalVolume.java	7 Nov 2007 22:10:13 -0000	1.5
@@ -22,9 +22,15 @@
 	IPhysicalVolumeContainer physicalVolumes = new PhysicalVolumeContainer(true,true,false);
 		
 	public LogicalVolume(String name, ISolid solid, IMaterial material)
-	{
+	{        
+        if (name == null)
+            throw new IllegalArgumentException("LogicalVolume name points to null!"); 
 		this.name = name;
+        if (solid == null)
+            throw new IllegalArgumentException("Solid for LogicalVolume " + name + " points to null!");
 		this.solid = solid;
+        if (material == null)
+            throw new IllegalArgumentException("Material for LogicalVolume " + name + " points to null!");
 		this.material = material;		
 		
 		// Register with the store.
CVSspam 0.2.8