Move exception handling into the private parsing function
A test for unknown restart policy name
Raise a helpful error if unknown restart policy name is used.