Merge "Handle manifest parse errors in main"
diff --git a/main.py b/main.py
index 0c87c38..41c3ec6 100755
--- a/main.py
+++ b/main.py
@@ -49,6 +49,7 @@
 from editor import Editor
 from error import DownloadError
 from error import ManifestInvalidRevisionError
+from error import ManifestParseError
 from error import NoSuchProjectError
 from error import RepoChangedException
 from manifest_xml import XmlManifest
@@ -397,6 +398,9 @@
       close_ssh()
   except KeyboardInterrupt:
     result = 1
+  except ManifestParseError as mpe:
+    print >>sys.stderr, 'fatal: %s' % mpe
+    result = 1
   except RepoChangedException as rce:
     # If repo changed, re-exec ourselves.
     #