protected void GenerateExpression (CodeExpression e) { if (e == null) throw new ArgumentNullException ("e"); try { e.Accept (visitor); } catch (NotImplementedException) { throw new ArgumentException ("Element type " + e.GetType () + " is not supported.", "e"); } }