summaryrefslogtreecommitdiff
path: root/src/mind/topology.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/mind/topology.js')
-rw-r--r--src/mind/topology.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mind/topology.js b/src/mind/topology.js
index 9c5ecf7..9f2569d 100644
--- a/src/mind/topology.js
+++ b/src/mind/topology.js
@@ -49,11 +49,11 @@ function is_hidden(n, index) {
export function network_connect(n, source, sink, weight) {
if (is_input(n, sink)) {
// inputs cannot be sinks
- throw new Error("attempt to use input as sink");
+ throw new Error(`attempt to use input as sink (${source} -> ${sink})`);
}
if (is_output(n, source)) {
// outputs cannot be sources
- throw new Error("attempt to use output as source");
+ throw new Error(`attempt to use output as source (${source} -> ${sink})`);
}
return create({