Beispiel #1
0
        public bool Execute(bool throwOnFailure = false)
        {
            foreach (var step in _steps)
            {
                try
                {
                    step.Execute(_input, _runner);
                }
                catch (Exception ex)
                {
                    cleanupPackages();
                    _solution.Reset();

                    RippleLog.Error("Error executing {0}".ToFormat(step.GetType().Name), ex);

                    // Mostly for testing
                    if (_forceThrow || throwOnFailure)
                    {
                        throw;
                    }

                    return(false);
                }
            }

            _solution.EachProject(project => project.RemoveDuplicateReferences());
            _solution.Save(_forceSave);

            if (_resetSolution)
            {
                _solution.Reset();
            }

            return(true);
        }
Beispiel #2
0
        public static void Fail(string message, params object[] substitutions)
        {
            // TODO -- Hate this
            var formattedMessage = message;

            try
            {
                formattedMessage = message.ToFormat(substitutions);
            }
            catch (FormatException)
            {
                // Just swallow it
            }

            RippleLog.Error(formattedMessage);
            throw new RippleFatalError(message);
        }
Beispiel #3
0
 public static void Fail(string message, params object[] substitutions)
 {
     RippleLog.Error(message.ToFormat(substitutions));
     throw new RippleFatalError(message);
 }
Beispiel #4
0
 public static void Fail(string message)
 {
     RippleLog.Error(message);
     throw new RippleFatalError(message);
 }