|  | @@ -1730,7 +1730,13 @@ public class InternalEngine extends Engine {
 | 
	
		
			
				|  |  |          // we need to fail the engine. it might have already been failed before
 | 
	
		
			
				|  |  |          // but we are double-checking it's failed and closed
 | 
	
		
			
				|  |  |          if (indexWriter.isOpen() == false && indexWriter.getTragicException() != null) {
 | 
	
		
			
				|  |  | -            failEngine("already closed by tragic event on the index writer", (Exception) indexWriter.getTragicException());
 | 
	
		
			
				|  |  | +            final Exception tragicException;
 | 
	
		
			
				|  |  | +            if (indexWriter.getTragicException() instanceof Exception) {
 | 
	
		
			
				|  |  | +                tragicException = (Exception) indexWriter.getTragicException();
 | 
	
		
			
				|  |  | +            } else {
 | 
	
		
			
				|  |  | +                tragicException = new RuntimeException(indexWriter.getTragicException());
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            failEngine("already closed by tragic event on the index writer", tragicException);
 | 
	
		
			
				|  |  |              engineFailed = true;
 | 
	
		
			
				|  |  |          } else if (translog.isOpen() == false && translog.getTragicException() != null) {
 | 
	
		
			
				|  |  |              failEngine("already closed by tragic event on the translog", translog.getTragicException());
 |