public TEnum ParseEnum <TEnum>(string value)
 {
     try
     {
         return((TEnum)Enum.Parse(typeof(TEnum), value, true));
     }
     catch
     {
         throw ParseException.AttributeError(this, "Invalid value specified for " + typeof(TEnum).Name + " (" + value + ")");
     }
 }
 /// <summary>
 /// Creates an exception to be thrown with information about the position in a job specification
 /// </summary>
 /// <param name="message"></param>
 /// <param name="args"></param>
 /// <returns></returns>
 public ParseException AttributeError(string message, params object[] args)
 {
     return(ParseException.AttributeError(this, args.Length > 0 ? string.Format(message, args) : message));
 }