Ejemplo n.º 1
0
        /// <summary>
        /// EV Exception if thrown use error code for locating message from resource file.
        /// This function logs the message as well...
        /// </summary>
        /// <param name="evException">EV specific application error.</param>
        /// <param name="consumerClass">Type</param>
        /// <param name="location">Location from which message is being logged - normally it's function name</param>
        /// <param name="jobId">int</param>
        /// <param name="jobRunId">int</param>
        /// <returns>Success Status.</returns>
        private void LogToEventLog(EVException evException, Type consumerClass, string location, int jobId, int jobRunId)
        {
            string message = Msg.FromRes(evException.GetErrorCode()); // Get user friendly message by the error code.

            LogMessage(message, true, LogCategory.Job, null);
            // Log message
            LogMessage(message + Constants.NextLineCharacter + evException.ToUserString(), consumerClass, location, EventLogEntryType.Error, jobId, jobRunId);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the EV exception description.
        /// </summary>
        /// <param name="evException">The ev exception.</param>
        /// <returns></returns>
        private string GetEvExceptionDescription(EVException evException)
        {
            string message = Msg.FromRes(evException.GetErrorCode()); // Get user friendly message by the error code.

            return(message);
        }