Index: trunk/FACT++/scripts/Observation_class.js
===================================================================
--- trunk/FACT++/scripts/Observation_class.js	(revision 18713)
+++ trunk/FACT++/scripts/Observation_class.js	(revision 18714)
@@ -20,4 +20,5 @@
     if (isNaN(utc.valueOf()))
         throw new Error('"'+obj.date+'" not a valid Date... try something like "2013-01-08 23:05 UTC".');
+
     ret.start = utc;
     ret.id    = obj.id;
@@ -68,46 +69,43 @@
         case 'DATA':
             if (i!=obj.measurements.length-1)
-                throw new Error("DATA [n="+i+", "+utc.toUTCString()+"] must be the last in the list of measurements [cnt="+obj.measurements.length+"]");
+                throw new Error("Measurement DATA [n="+i+", "+utc.toUTCString()+"] must be the last in the list of measurements [cnt="+obj.measurements.length+"]");
             if (ret[i].source == undefined)
-                throw new Error("Observation must have either 'source' or 'task' " +
-                                "if 'task' == 'data' it must have also have 'source' ");
-            if (ret[i].lidclosed == true)
-                throw new Error("Observation must not have 'lidclosed'== true " +
-                                "if 'task' == 'data' ");
+                throw new Error("Measurement DATA must have a source defined");
+            // This is obsolete. We cannot check everything which is not evaluated anyways
+            //if (ret[i].lidclosed == true)
+            //    throw new Error("Observation must not have 'lidclosed'==true " +
+            //                    "if 'task'=='data'");
+            break;
+
+        case 'SUSPEND':
+        case 'RESUME':
+            if (obj.measurements.length!=1)
+                throw new Error("Measurement "+ret[i].task+" [n="+i+", "+utc.toUTCString()+"] must be the only measurements [cnt="+obj.measurements.length+"] in an observation");
             break;
 
         case 'STARTUP':
-            if (ret[i].source != undefined)
-                console.out("warning. Observation with task='startup' also has source defined");
-            break;
-
         case 'SHUTDOWN':
             if (ret[i].source != undefined)
-                console.out("warning. Observation with task='shutdown' also has source defined");
+                console.out("WARNING - Measurement "+ret[i].task+" has a source defined");
             break;
 
         case 'RATESCAN':
             if (ret[i].source == undefined && (isNaN(ret[i].ra) || isNaN(ret[i].dec)))
-                throw new Error("Observation must have either 'source' or 'ra' & 'dec' " +
-                                "if 'task' == 'ratescan'");
-            if (ret[i].lidclosed == true)
-                throw new Error("Observation must not have 'lidclosed'== true " +
-                                "if 'task' == 'ratescan' ");
+                throw new Error("Measurement RATESCAN must have either a source or 'ra' & 'dec' defined");
+            // This is obsolete. We cannot check everything which is not evaluated anyways
+            //if (ret[i].lidclosed == true)
+            //    throw new Error("Observation RATESCAN must not have 'lidclosed'==true");
             break;
 
         case 'RATESCAN2':
             if ((ret[i].lidclosed != true) && ret[i].source == undefined && (isNaN(ret[i].ra) || isNaN(ret[i].dec)))
-                throw new Error("Observation must have either 'source' or 'ra' & 'dec' " +
-                                "if 'task' == 'ratescan2' and lidclosed==false or not given");
+                throw new Error("Measurement RATESCAN2 ('lidclosed'==false or undefined) must have either a source or 'ra' & 'dec' defined");
             if (ret[i].lidclosed == true && (isNaN(ret[i].az) || isNaN(ret[i].az)))
-                throw new Error("Observation must have 'zd' & 'az' " +
-                                "if 'task' == 'ratescan2' and option 'lidclosed'=='true'");
+                throw new Error("Measurement RATESCAN2 ('lidclosed'==true) must have 'zd' & 'az' defined");
             break;
 
         case 'CUSTOM':
-
             if (isNaN(ret[i].az) || isNaN(ret[i].az) || isNaN(ret[i].time) || isNaN(ret[i].threshold))
-                throw new Error("Observation must have 'zd' & 'az', 'time' and 'threshold' " +
-                                "if 'task' == 'custom' ");
+                throw new Error("Measurement CUSTOM must have 'zd' & 'az', 'time' and 'threshold' defined.");
             break;
 
@@ -120,5 +118,5 @@
 
         default:
-            throw new Error("The observation type "+ret[i].task+" is unknown.");
+            throw new Error("The measurement type "+ret[i].task+" is unknown.");
         }
     }
