DataSizeValidationException.cs 738 B

1234567891011121314151617181920
  1. using System;
  2. using Quadarax.Foundation.Core.Exceptions;
  3. namespace BO.AppServer.Business.Exceptions
  4. {
  5. public class DataSizeValidationException : CodeException
  6. {
  7. private const string CS_MESSAGE = "Entity '{0}' filed '{1}' maximal length overflow (max. {2}).";
  8. private const int CN_CODE = 1010;
  9. public DataSizeValidationException(Type entityType, string fieldName, int max, Exception innerException) : base(CN_CODE, string.Format(CS_MESSAGE,entityType.Name, fieldName, max), innerException)
  10. {
  11. }
  12. public DataSizeValidationException(Type entityType, string fieldName, int max) : base(CN_CODE, string.Format(CS_MESSAGE,entityType.Name, fieldName, max))
  13. {
  14. }
  15. }
  16. }