1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
package com.xpn.xwiki.plugin; |
21 |
|
|
22 |
|
import java.text.MessageFormat; |
23 |
|
|
24 |
|
import com.xpn.xwiki.XWikiException; |
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@version |
30 |
|
@deprecated |
31 |
|
|
32 |
|
@Deprecated |
|
|
| 13% |
Uncovered Elements: 20 (23) |
Complexity: 8 |
Complexity Density: 0.53 |
|
33 |
|
public class PluginException extends XWikiException |
34 |
|
{ |
35 |
|
|
36 |
|
private static final MessageFormat CUSTOM_MESSAGE = new MessageFormat("Exception in plugin [{0}]: {1}"); |
37 |
|
|
38 |
|
|
39 |
|
private final String pluginName; |
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
@param |
45 |
|
@param |
46 |
|
@param |
47 |
|
@param |
48 |
|
@param |
49 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
50 |
0 |
public PluginException(String pluginName, int code, String message, Throwable e, Object[] args)... |
51 |
|
{ |
52 |
0 |
super(XWikiException.MODULE_XWIKI_PLUGINS, code, CUSTOM_MESSAGE.format(new Object[] { pluginName, message }), |
53 |
|
e, args); |
54 |
0 |
this.pluginName = pluginName; |
55 |
|
} |
56 |
|
|
57 |
|
|
58 |
|
|
59 |
|
|
60 |
|
@param |
61 |
|
@param |
62 |
|
@param |
63 |
|
@param |
64 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
65 |
0 |
public PluginException(String pluginName, int code, String message, Throwable e)... |
66 |
|
{ |
67 |
0 |
super(XWikiException.MODULE_XWIKI_PLUGINS, code, CUSTOM_MESSAGE.format(new Object[] { pluginName, message }), |
68 |
|
e); |
69 |
0 |
this.pluginName = pluginName; |
70 |
|
} |
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
|
75 |
|
@param |
76 |
|
@param |
77 |
|
@param |
78 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
79 |
15 |
public PluginException(String pluginName, int code, String message)... |
80 |
|
{ |
81 |
15 |
super(XWikiException.MODULE_XWIKI_PLUGINS, code, CUSTOM_MESSAGE.format(new Object[] { pluginName, message })); |
82 |
15 |
this.pluginName = pluginName; |
83 |
|
} |
84 |
|
|
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
@param |
89 |
|
@param |
90 |
|
@param |
91 |
|
@param |
92 |
|
@param |
93 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
94 |
0 |
public PluginException(java.lang.Class<? extends XWikiPluginInterface> plugin, int code, String message,... |
95 |
|
Throwable e, Object[] args) |
96 |
|
{ |
97 |
0 |
super(XWikiException.MODULE_XWIKI_PLUGINS, code, |
98 |
|
CUSTOM_MESSAGE.format(new Object[] { plugin.getName(), message }), e, args); |
99 |
0 |
this.pluginName = plugin.getName(); |
100 |
|
} |
101 |
|
|
102 |
|
|
103 |
|
|
104 |
|
|
105 |
|
@param |
106 |
|
@param |
107 |
|
@param |
108 |
|
@param |
109 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
110 |
0 |
public PluginException(java.lang.Class<? extends XWikiPluginInterface> plugin, int code, String message,... |
111 |
|
Throwable e) |
112 |
|
{ |
113 |
0 |
super(XWikiException.MODULE_XWIKI_PLUGINS, code, |
114 |
|
CUSTOM_MESSAGE.format(new Object[] { plugin.getName(), message }), e); |
115 |
0 |
this.pluginName = plugin.getName(); |
116 |
|
} |
117 |
|
|
118 |
|
|
119 |
|
|
120 |
|
|
121 |
|
@param |
122 |
|
@param |
123 |
|
@param |
124 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
125 |
0 |
public PluginException(java.lang.Class<? extends XWikiPluginInterface> plugin, int code, String message)... |
126 |
|
{ |
127 |
0 |
super(XWikiException.MODULE_XWIKI_PLUGINS, code, |
128 |
|
CUSTOM_MESSAGE.format(new Object[] { plugin.getName(), message })); |
129 |
0 |
this.pluginName = plugin.getName(); |
130 |
|
} |
131 |
|
|
132 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
133 |
0 |
public PluginException()... |
134 |
|
{ |
135 |
0 |
super(); |
136 |
0 |
this.pluginName = "unknown"; |
137 |
|
} |
138 |
|
|
139 |
|
|
140 |
|
|
141 |
|
|
142 |
|
@return@link |
143 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
144 |
0 |
public String getPluginName()... |
145 |
|
{ |
146 |
0 |
return this.pluginName; |
147 |
|
} |
148 |
|
} |