Coverage Report - com.aragost.javahg.internals.UnexpectedCommandOutputException
 
Classes in this File Line Coverage Branch Coverage Complexity
UnexpectedCommandOutputException
0%
0/9
0%
0/2
1.333
 
 1  
 package com.aragost.javahg.internals;
 2  
 
 3  
 
 4  
 /**
 5  
  * Exception thrown when during parsing of the output from command
 6  
  * server, some unexpected output is encountered.
 7  
  * <p>
 8  
  * It means that Mercurial generated output that JavaHg didn't
 9  
  * anticipate. If this exception is throw it generally means there is a
 10  
  * bug in JavaHg.
 11  
  */
 12  
 public class UnexpectedCommandOutputException extends RuntimeException {
 13  
 
 14  
     private static final long serialVersionUID = 1L;
 15  
 
 16  
     public UnexpectedCommandOutputException(AbstractCommand command, String s) {
 17  0
         super(createMessage(command, s));
 18  0
     }
 19  
 
 20  
     public UnexpectedCommandOutputException(String msg) {
 21  0
         super(msg);
 22  0
     }
 23  
 
 24  
     private static String createMessage(AbstractCommand command, String s) {
 25  0
         StringBuilder builder = new StringBuilder();
 26  0
         builder.append("Unexpected output from: ").append(command);
 27  0
         if (s != null) {
 28  0
             builder.append(" [").append(s).append(']');
 29  
         }
 30  0
         return builder.toString();
 31  
     }
 32  
 
 33  
 }