Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
context.isRejected = true;
context.rejectedMessages += input_row.message;
private class TalendException extends Exception {
private java.util.Map<String, Object> globalMap = null;
private Exception e = null;
private String currentComponent = null;
private TalendException(Exception e, String errorComponent,
final java.util.Map<String, Object> globalMap) {
this.currentComponent = errorComponent;
this.globalMap = globalMap;
this.e = e;
}
@Override
public void printStackTrace() {
if (!(e instanceof TalendException || e instanceof TDieException)) {
globalMap.put(currentComponent + "_ERROR_MESSAGE", e
.getMessage());
System.err
.println("Exception in component " + currentComponent);
}
if (!(e instanceof TDieException)) {
if (e instanceof TalendException) {
e.printStackTrace();
} else {
e.printStackTrace();
e.printStackTrace(errorMessagePS);
}
}
if (!(e instanceof TalendException)) {
try {
for (java.lang.reflect.Method m : this.getClass()
.getEnclosingClass().getMethods()) {
if (m.getName().compareTo(currentComponent + "_error") == 0) {
m.invoke(TX_SPAccoContractSupplements2TOST90.this,
new Object[] { e, currentComponent,
globalMap });
break;
}
}
if (!(e instanceof TDieException)) {
tLogCatcher_1.addMessage("Java Exception",
currentComponent, 6, e.getClass().getName()
+ ":" + e.getMessage(), 1);
tLogCatcher_1Process(globalMap);
}
} catch (java.lang.SecurityException e) {
this.e.printStackTrace();
} catch (java.lang.IllegalArgumentException e) {
this.e.printStackTrace();
} catch (java.lang.IllegalAccessException e) {
this.e.printStackTrace();
} catch (java.lang.reflect.InvocationTargetException e) {
this.e.printStackTrace();
} catch (TalendException e) {
// do nothing
}
}
}
}
//check for errors... once again it is hardcoded...
if (globalMap.get("tPrejob_1_ERROR_MESSAGE") != null) {
context.isRejected = true;
context.rejectedMessages += "\n" + (String)globalMap.get("tPrejob_1_ERROR_MESSAGE");
}
if (globalMap.get("tMSSqlConnection_1_ERROR_MESSAGE") != null) {
context.isRejected = true;
context.rejectedMessages += "\n" + (String)globalMap.get("tMSSqlConnection_1_ERROR_MESSAGE");
}
if (globalMap.get("tDB2Connection_1_ERROR_MESSAGE") != null) {
context.isRejected = true;
context.rejectedMessages += "\n" + (String)globalMap.get("tDB2Connection_1_ERROR_MESSAGE");
}
if (globalMap.get("tMSSqlInput_1_ERROR_MESSAGE") != null) {
context.isRejected = true;
context.rejectedMessages += "\n" + (String)globalMap.get("tMSSqlInput_1_ERROR_MESSAGE");
}
if (globalMap.get("tDB2Output_1_ERROR_MESSAGE") != null) {
context.isRejected = true;
context.rejectedMessages += "\n" + (String)globalMap.get("tDB2Output_1_ERROR_MESSAGE");
}