mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-10-31 09:09:25 +08:00 
			
		
		
		
	Removes printing of error messages when propagating
This commit is contained in:
		 Phil Scott
					Phil Scott
				
			
				
					committed by
					
						 Patrik Svensson
						Patrik Svensson
					
				
			
			
				
	
			
			
			 Patrik Svensson
						Patrik Svensson
					
				
			
						parent
						
							3463dde543
						
					
				
				
					commit
					8d67c0a6b4
				
			| @@ -90,13 +90,6 @@ namespace Spectre.Console.Cli | |||||||
|             } |             } | ||||||
|             catch (Exception ex) |             catch (Exception ex) | ||||||
|             { |             { | ||||||
|                 // Render the exception. |  | ||||||
|                 var pretty = GetRenderableErrorMessage(ex); |  | ||||||
|                 if (pretty != null) |  | ||||||
|                 { |  | ||||||
|                     _configurator.Settings.Console.SafeRender(pretty); |  | ||||||
|                 } |  | ||||||
|  |  | ||||||
|                 // Should we always propagate when debugging? |                 // Should we always propagate when debugging? | ||||||
|                 if (Debugger.IsAttached |                 if (Debugger.IsAttached | ||||||
|                     && ex is CommandAppException appException |                     && ex is CommandAppException appException | ||||||
| @@ -110,6 +103,13 @@ namespace Spectre.Console.Cli | |||||||
|                     throw; |                     throw; | ||||||
|                 } |                 } | ||||||
|  |  | ||||||
|  |                 // Render the exception. | ||||||
|  |                 var pretty = GetRenderableErrorMessage(ex); | ||||||
|  |                 if (pretty != null) | ||||||
|  |                 { | ||||||
|  |                     _configurator.Settings.Console.SafeRender(pretty); | ||||||
|  |                 } | ||||||
|  |  | ||||||
|                 return -1; |                 return -1; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user