Exemplo n.º 1
0
 public ErrorRecord(Exception exception, string errorId, ErrorCategory errorCategory, object targetObject)
 {
     Exception             = exception;
     FullyQualifiedErrorId = errorId;
     TargetObject          = targetObject;
     CategoryInfo          = new ErrorCategoryInfo(exception, errorCategory);
 }
Exemplo n.º 2
0
 public ErrorRecord(Exception exception, string errorId, ErrorCategory errorCategory, object targetObject)
 {
     Exception = exception;
     ErrorId = errorId;
     TargetObject = targetObject;
     CategoryInfo = new ErrorCategoryInfo(exception, errorCategory);
 }
Exemplo n.º 3
0
        public ErrorRecord(Exception exception, string errorId, ErrorCategory errorCategory, object targetObject)
        {
            if (exception == null)
            {
                throw new PSArgumentNullException("exception");
            }

            Exception = exception;
            ErrorId = errorId;
            TargetObject = targetObject;
            CategoryInfo = new ErrorCategoryInfo(exception, errorCategory);

            if (targetObject != null)
            {
                CategoryInfo.TargetName = targetObject.ToString();
                CategoryInfo.TargetType = targetObject.GetType().Name;
            };
        }
Exemplo n.º 4
0
        public ErrorRecord(Exception exception, string errorId, ErrorCategory errorCategory, object targetObject)
        {
            if (exception == null)
            {
                throw new PSArgumentNullException("exception");
            }

            Exception    = exception;
            ErrorId      = errorId;
            TargetObject = targetObject;
            CategoryInfo = new ErrorCategoryInfo(exception, errorCategory);

            if (targetObject != null)
            {
                CategoryInfo.TargetName = targetObject.ToString();
                CategoryInfo.TargetType = targetObject.GetType().Name;
            }
            ;
        }