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 | 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 | |
} |