EMMA Coverage Report (generated Mon Aug 23 17:21:34 CEST 2010) |
---|
[all classes][dmg.util] |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
Exceptions.java | 100% (1/1) | 33% (1/3) | 86% (25/29) | 75% (6/8) |
name | class, % | method, % | block, % | line, % |
---|---|---|---|---|
class Exceptions | 100% (1/1) | 33% (1/3) | 86% (25/29) | 75% (6/8) |
Exceptions (): void | 0% (0/1) | 0% (0/3) | 0% (0/1) | |
Exceptions (): void | 0% (0/1) | 0% (0/1) | 0% (0/1) | |
getMessageWithCauses (Throwable): String | 100% (1/1) | 100% (25/25) | 100% (6/6) |
1 | package dmg.util; |
2 | |
3 | /** |
4 | * Contains static utility methods for exceptions. |
5 | */ |
6 | public class Exceptions |
7 | { |
8 | private void Exceptions() |
9 | { |
10 | } |
11 | |
12 | /** |
13 | * Returns the message string of the Throwable and that of all its |
14 | * causes. |
15 | */ |
16 | public static String getMessageWithCauses(Throwable t) |
17 | { |
18 | StringBuilder msg = new StringBuilder(t.getMessage()); |
19 | t = t.getCause(); |
20 | while (t != null) { |
21 | msg.append("; caused by: ").append(t.getMessage()); |
22 | t = t.getCause(); |
23 | } |
24 | return msg.toString(); |
25 | } |
26 | } |
[all classes][dmg.util] |
EMMA 2.0.5312 (C) Vladimir Roubtsov |