Esempio n. 1
0
        internal void WriteNonTerminatingError(string serviceName, string displayName, object targetObject, Exception innerException, string errorId, string errorMessage, ErrorCategory category)
        {
            object message;
            string str = errorMessage;

            object[] objArray = new object[3];
            objArray[0] = serviceName;
            objArray[1] = displayName;
            object[] objArray1 = objArray;
            int      num       = 2;

            if (innerException == null)
            {
                message = "";
            }
            else
            {
                message = innerException.Message;
            }
            objArray1[num] = message;
            string str1 = StringUtil.Format(str, objArray);
            ServiceCommandException serviceCommandException = new ServiceCommandException(str1, innerException);

            serviceCommandException.ServiceName = serviceName;
            base.WriteError(new ErrorRecord(serviceCommandException, errorId, category, targetObject));
        }
Esempio n. 2
0
		internal void WriteNonTerminatingError(string serviceName, string displayName, object targetObject, Exception innerException, string errorId, string errorMessage, ErrorCategory category)
		{
			object message;
			string str = errorMessage;
			object[] objArray = new object[3];
			objArray[0] = serviceName;
			objArray[1] = displayName;
			object[] objArray1 = objArray;
			int num = 2;
			if (innerException == null)
			{
				message = "";
			}
			else
			{
				message = innerException.Message;
			}
			objArray1[num] = message;
			string str1 = StringUtil.Format(str, objArray);
			ServiceCommandException serviceCommandException = new ServiceCommandException(str1, innerException);
			serviceCommandException.ServiceName = serviceName;
			base.WriteError(new ErrorRecord(serviceCommandException, errorId, category, targetObject));
		}
Esempio n. 3
0
        /// <summary>
        /// Writes a non-terminating error.
        /// </summary>
        /// <param name="serviceName"></param>
        /// <param name="displayName"></param>
        /// <param name="targetObject"></param>
        /// <param name="innerException"></param>
        /// <param name="errorId"></param>
        /// <param name="errorMessage"></param>
        /// <param name="category"></param>
        internal void WriteNonTerminatingError(
            string serviceName,
            string displayName,
            object targetObject,
            Exception innerException,
            string errorId,
            string errorMessage,
            ErrorCategory category)
        {
            string message = StringUtil.Format(errorMessage,
                serviceName,
                displayName,
                (null == innerException) ? "" : innerException.Message
                );
            ServiceCommandException exception =
                new ServiceCommandException(message, innerException);
            exception.ServiceName = serviceName;

            if (innerException != null)
            {
            }
            else
            {
            }

            WriteError(new ErrorRecord(exception, errorId, category, targetObject));
        }