Commit in lcsim/src/org/lcsim/conditions on MAIN
DetectorLocator.java+2-101.2 -> 1.3
JM: Throw an exception if a detector is not retrievable

lcsim/src/org/lcsim/conditions
DetectorLocator.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- DetectorLocator.java	8 Feb 2006 00:50:21 -0000	1.2
+++ DetectorLocator.java	16 Feb 2006 01:55:28 -0000	1.3
@@ -55,12 +55,7 @@
         }
         catch (Exception e)
         {
-            new RuntimeException("DetectorLocator.findDetector() - error while locating " + detName, e);
-            
-            if ( detector == null )
-            {
-                System.out.println("Detector <" + detName + "> was not found.");
-            }
+            throw new RuntimeException("Problem while locating detector " + detName, e);
         }
             
         return detector;
@@ -108,14 +103,11 @@
         for ( String n : names )
         {
             Detector det = findDetector(n);            
+            
             if ( det != null )
             {
                 System.out.println("Cached detector: " + n);
             }
-            else 
-            {
-                System.err.println("Failed to locate detector: " + n);
-            }
         }
     }
     
CVSspam 0.2.8