aboutsummaryrefslogtreecommitdiff
path: root/mod/types-parsers.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/types-parsers.cxx')
-rw-r--r--mod/types-parsers.cxx26
1 files changed, 24 insertions, 2 deletions
diff --git a/mod/types-parsers.cxx b/mod/types-parsers.cxx
index 34a8bac..f135608 100644
--- a/mod/types-parsers.cxx
+++ b/mod/types-parsers.cxx
@@ -204,9 +204,9 @@ namespace brep
{
x = fragment (v, o);
}
- catch (const xml::parsing&)
+ catch (const xml::parsing& e)
{
- throw invalid_value (o, v);
+ throw invalid_value (o, v, e.what ());
}
}
@@ -261,5 +261,27 @@ namespace brep
else
throw invalid_value (o, v);
}
+
+ // Parse build_email.
+ //
+ void parser<build_email>::
+ parse (build_email& x, bool& xs, scanner& s)
+ {
+ xs = true;
+ const char* o (s.next ());
+
+ if (!s.more ())
+ throw missing_value (o);
+
+ const string v (s.next ());
+ if (v == "none")
+ x = build_email::none;
+ else if (v == "latest")
+ x = build_email::latest;
+ else if (v == "all")
+ x = build_email::all;
+ else
+ throw invalid_value (o, v);
+ }
}
}