1   package com.aragost.javahg.internals;
2   
3   
4   
5   
6   
7   
8   
9   
10  
11  
12  public class UnexpectedCommandOutputException extends RuntimeException {
13  
14      private static final long serialVersionUID = 1L;
15  
16      public UnexpectedCommandOutputException(AbstractCommand command, String s) {
17          super(createMessage(command, s));
18      }
19  
20      public UnexpectedCommandOutputException(String msg) {
21          super(msg);
22      }
23  
24      private static String createMessage(AbstractCommand command, String s) {
25          StringBuilder builder = new StringBuilder();
26          builder.append("Unexpected output from: ").append(command);
27          if (s != null) {
28              builder.append(" [").append(s).append(']');
29          }
30          return builder.toString();
31      }
32  
33  }