protected override void AddParsedSubObject(object obj) { if (!ListControlUtil.AddParsedSubObjectReplacement(this, obj)) { base.AddParsedSubObject(obj); } }
protected override void AddParsedSubObject(object obj) { try { if (!ListControlUtil.AddParsedSubObjectReplacement(this, obj)) { base.AddParsedSubObject(obj); } } catch (Exception ex) { if (obj is LiteralControl) { throw new Exception(String.Format("Error while trying to add a literal with text: '{0}'", ((LiteralControl)obj).Text), ex); } throw new Exception("Error while trying to add subobject of type " + obj.GetType().FullName, ex); } }