Commits

kenko committed 9bf2d64

parse errors are possible

Comments (0)

Files changed (1)

 parseXML = readDocument [withValidate False]
 
 readfile f repu repapo = do
-  [r] <- liftIO $ runX (parseXML f >>> (collect repu repapo))
+  r <- liftIO $ runX (parseXML f >>> (collect repu repapo))
   case r of 
-    Right s -> return s
-    Left e -> throwError e
+    [] -> throwError $ "Couldn't parse emx file "++f++" at all!"
+    [Right s] -> return s
+    [Left e] -> throwError e