mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Update some core nodes info
This commit is contained in:
@@ -1,18 +1,3 @@
|
||||
<!--
|
||||
Copyright JS Foundation and other contributors, http://js.foundation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<script type="text/x-red" data-template-name="catch">
|
||||
<div class="form-row">
|
||||
@@ -41,6 +26,20 @@
|
||||
</script>
|
||||
<script type="text/x-red" data-help-name="catch">
|
||||
<p>Catch errors thrown by nodes on the same tab.</p>
|
||||
<h3>Outputs</h3>
|
||||
<dl class="message-properties">
|
||||
<dt>msg <span class="property-type">object</span></dt>
|
||||
<dd>the original msg object message (if available).</dd>
|
||||
<dt>msg.error.message <span class="property-type">string</span></dt>
|
||||
<dd>the error message.</dd>
|
||||
<dt>msg.error.source.id <span class="property-type">string</span></dt>
|
||||
<dd>the id of the node that threw the error.</dd>
|
||||
<dt>msg.error.source.type <span class="property-type">string</span></dt>
|
||||
<dd>the type of the node that threw the error.</dd>
|
||||
<dt>msg.error.source.name <span class="property-type">string</span></dt>
|
||||
<dd>the name, if set, of the node that threw the error.</dd>
|
||||
</dl>
|
||||
<h3>Details</h3>
|
||||
<p>If a node throws a error whilst handling a message, the flow will typically
|
||||
halt. This node can be used to catch those errors and handle them with a
|
||||
dedicated flow.</p>
|
||||
@@ -49,16 +48,6 @@
|
||||
<p>If an error is thrown within a subflow, the error will get handled by any
|
||||
catch nodes within the subflow. If none exists, the error is propagated
|
||||
up to the tab the subflow instance is on.</p>
|
||||
<p>The message sent by this node will be the original message if the node that
|
||||
threw the error provided it. The message will have an <code>error</code>
|
||||
property with the following attributes:
|
||||
<ul>
|
||||
<li><code>message</code> : the error message</li>
|
||||
<li><code>source.id</code> : the id of the node that threw the error</li>
|
||||
<li><code>source.type</code> : the type of the node that threw the error</li>
|
||||
<li><code>source.name</code> : the name, if set, of the node that threw the error</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>If the message already had a <code>error</code> property, it is copied to <code>_error</code>.</p>
|
||||
</script>
|
||||
<style>
|
||||
@@ -123,7 +112,7 @@
|
||||
var editorRow = $("#dialog-form>div.node-input-target-row");
|
||||
height -= (parseInt(editorRow.css("marginTop"))+parseInt(editorRow.css("marginBottom")));
|
||||
$("#node-input-catch-target-container-div").css("height",height+"px");
|
||||
}
|
||||
};
|
||||
|
||||
function createNodeList() {
|
||||
var scope = node.scope || [];
|
||||
@@ -233,11 +222,11 @@
|
||||
|
||||
$("#node-input-target-sort-type").click(function(e) {
|
||||
e.preventDefault();
|
||||
sortNodeList('sublabel')
|
||||
sortNodeList('sublabel');
|
||||
});
|
||||
$("#node-input-target-node-checkbox-all").change(function() {
|
||||
$(".node-input-target-node-checkbox").prop('checked',this.checked);
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -251,7 +240,7 @@
|
||||
}
|
||||
node.resize();
|
||||
});
|
||||
if (this.scope == null) {
|
||||
if (this.scope === null) {
|
||||
$("#node-input-scope-select").val("all");
|
||||
} else {
|
||||
$("#node-input-scope-select").val("target");
|
||||
@@ -269,7 +258,7 @@
|
||||
if ($(this).prop("checked")) {
|
||||
node.scope.push($(this).data('node-id'));
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
oneditresize: function(size) {
|
||||
|
||||
Reference in New Issue
Block a user