Example #1
0
        protected void SetErrorMessage(BaseValidator validator, N2.Definitions.NotAllowedParentException ex)
        {
            logger.Debug(ex);

            string message = string.Format(GetLocalResourceString("NotAllowedParentExceptionFormat", "The item of type \"{0}\" isn't allowed below a destination of type \"{1}\""),
                                           ex.ItemDefinition.Title,
                                           Engine.Definitions.GetDefinition(ex.ParentType).Title);

            SetErrorMessage(validator, message);
        }
Example #2
0
        protected void SetErrorMessage(BaseValidator validator, N2.Definitions.NotAllowedParentException ex)
        {
            Trace.Write(ex.ToString());

            string message = string.Format(GetLocalResourceString("NotAllowedParentExceptionFormat"),
                                           ex.ItemDefinition.Title,
                                           Engine.Definitions.GetDefinition(ex.ParentType).Title);

            SetErrorMessage(validator, message);
        }