Exemple #1
0
        protected void HandleError(BaseModel baseModel = null, LookUps.ErrorType errorType = LookUps.ErrorType.Exception, Exception ex = null, string message = null, string propertyType = "")
        {
            if (baseModel != null)
            {
                if (ex != null)
                {
                    baseModel.AddError(ex.Message, errorType, propertyType);
                }
                else
                {
                    baseModel.AddError(message, errorType, propertyType);
                }
            }

            if (ex != null)
            {
                contextInfo.ErrorHelper.LogError(ex);
            }
        }