Add coords to duplicate connection GridException.
This exception isn't caught and crashes the server. Added block coordinates to aid in diagnostics.
This commit is contained in:
@@ -77,8 +77,12 @@ public class GridConnection implements IGridConnection, IPathItem
|
||||
throw new GridException( "Connection Forged Between null entities." );
|
||||
|
||||
if ( a.hasConnection( b ) || b.hasConnection( a ) )
|
||||
throw new GridException( "Connection already exists." );
|
||||
{
|
||||
final String aCoords = a.getGridBlock().getLocation().toString();
|
||||
final String bCoords = b.getGridBlock().getLocation().toString();
|
||||
|
||||
throw new GridException( String.format( "Connection already exists between node at [%s] and node at [%s].", aCoords, bCoords ) );
|
||||
}
|
||||
this.sideA = a;
|
||||
this.fromAtoB = fromAtoB;
|
||||
this.sideB = b;
|
||||
|
||||
Reference in New Issue
Block a user