TranslationFailure.java
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* javax.jcr.Node
* javax.jcr.RepositoryException
*/
package com.adobe.cq.wcm.translation.impl;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
public class TranslationFailure {
private Node node;
private String strPropertyName;
private String strPropertyText;
private Exception raisedException;
TranslationFailure(Node failedNode, String strPropName, String strPropValue, Exception exp) {
this.node = failedNode;
this.strPropertyName = strPropName;
this.strPropertyText = strPropValue;
this.raisedException = exp;
}
public String toString() {
String strRetVal;
try {
strRetVal = "Error while translating " + this.node.getPath() + " Property Name is " + this.strPropertyName;
if (this.raisedException != null) {
strRetVal = strRetVal + " Error is " + this.raisedException.toString();
}
if (this.strPropertyText != null) {
strRetVal = strRetVal + " Property Value is " + this.strPropertyText;
}
}
catch (RepositoryException e) {
strRetVal = "Error while generating toString for Failure";
}
return strRetVal;
}
}