Add exception content to plc adapter exception
@@ -145,11 +145,12 @@ public class Plc4xS7Adapter extends PullAdapter {
*/
@Override
public GuessSchema getSchema(SpecificAdapterStreamDescription adapterDescription) throws AdapterException {
- // TODO add a validation to check if the user input is available in the PLC
// Extract user input
getConfigurations(adapterDescription);
+ // TODO add a validation to check if the user input is available in the PLC
+
GuessSchema guessSchema = new GuessSchema();
EventSchema eventSchema = new EventSchema();
@@ -182,7 +183,6 @@ public class Plc4xS7Adapter extends PullAdapter {
getConfigurations(adapterDescription);
try {
-// this.plcConnection= new PlcDriverManager().getConnection("s7://" + this.ip + "/1/1");
this.plcConnection = new PlcDriverManager().getConnection("s7://" + this.ip);
if (!this.plcConnection.getMetadata().canRead()) {
@@ -190,7 +190,7 @@ public class Plc4xS7Adapter extends PullAdapter {
}
} catch (PlcConnectionException e) {
- throw new AdapterException("Could not establish connection to S7 with ip " + this.ip);
+ throw new AdapterException("Could not establish connection to S7 with ip " + this.ip, e);
}
}
