validaz
parent
125f856eca
commit
73d8fa11e9
|
|
@ -185,7 +185,7 @@ module.exports = function (RED) {
|
||||||
write_msg.assert(msg);
|
write_msg.assert(msg);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
let errors = write_msg.validate(msg);
|
let errors = write_msg.validate(msg);
|
||||||
node.error("Msg non valido: " + errors.map(x => x.path + ": " + x.error).join("\n"));
|
node.error("Msg non valido: " + errors.map(x => x.path + ": " + x.message).join("\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
s7node_from_plc(msg.plc).then(s7conn => {
|
s7node_from_plc(msg.plc).then(s7conn => {
|
||||||
|
|
@ -212,7 +212,7 @@ module.exports = function (RED) {
|
||||||
read_msg.assert(msg);
|
read_msg.assert(msg);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
let errors = read_msg.validate(msg);
|
let errors = read_msg.validate(msg);
|
||||||
node.error("Msg " + JSON.stringify(msg) + " non valido: " + errors.map(x => x.path + ": " + x.error).join("\n"));
|
node.error("Msg " + JSON.stringify(msg) + " non valido: " + errors.map(x => x.path + ": " + x.message).join("\n"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
s7node_from_plc(msg.plc).then(s7conn => {
|
s7node_from_plc(msg.plc).then(s7conn => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue