Hello!
Alternatively, you could probably also detect this using a
custom conection checker. The `canConnection` method calls `canConnectWithReason` which returns
a number which specifies whether the connections can connect, and if not why not. So you should be able to create a custom connection checker, and then add code that informs the user of the failure to the `canConnect` method.
E.g.:
```
class MyConnectionChecker extends Blockly.ConnectionChecker {
canConnect(a, b, isDragging, distance) {
const reason = this.canConnectWithReason(a, b, isDragging, distance);
switch (reason) {
// Add surfacing information about the failure here.
}
return reason === Connection.CAN_CONNECT;
}
}
```
Here's an
example of creating a simple custom connection checker.
I hope that helps! If you have any further questions please reply =)
--Beka