Exemplo n.º 1
0
        public void ShouldThrowUnmodifiedEngineException()
        {
            var ex = new EngineException("Original Exception Message");

            // The message passed in as parameter shouldn't be used
            Exceptions.Throw(ex, "New Exception Message");
        }
Exemplo n.º 2
0
 /// <summary>
 /// A static extension to throw exceptions at one place to have a better control what to throw and when to throw
 /// </summary>
 /// <param name="obj">The object throwing the exception</param>
 /// <param name="ex">The exception that led to the crash</param>
 public static void Crash(EngineException ex, bool recoverable)
 {
     DebugHelper.Crash(ex, recoverable);
 }
Exemplo n.º 3
0
 public void ShouldThrowUnmodifiedEngineException()
 {
     var ex = new EngineException("Original Exception Message");
     // The message passed in as parameter shouldn't be used
     Exceptions.Throw(ex, "New Exception Message");
 }