public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException { String name = args[0].val(); String channel = args[1].val(); NodePoint node; try { node = Tracking.getSub(name); } catch (com.entityreborn.communication.Exceptions.InvalidNameException ex) { throw new ConfigRuntimeException( "Invalid name " + name + " given to comm_unsubscribe!", Exceptions.ExceptionType.FormatException, t); } if (node == null) { throw new ConfigRuntimeException( "Unknown SUB " + name + " given to comm_unsubscribe!", Exceptions.ExceptionType.NotFoundException, t); } try { ((Subscriber) node).unsubscribe(channel); } catch (InvalidChannelException ex) { throw new ConfigRuntimeException( "Invalid channel " + channel + " given to comm_subscribe!", Exceptions.ExceptionType.FormatException, t); } catch (ZMQException e) { throw new ConfigRuntimeException( "Exception while unsubscribing: " + e.getMessage(), Exceptions.ExceptionType.IOException, t); } return CNull.NULL; }