Return-Path: X-Original-To: apmail-activemq-commits-archive@www.apache.org Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D7352109B3 for ; Fri, 11 Oct 2013 19:14:18 +0000 (UTC) Received: (qmail 62476 invoked by uid 500); 11 Oct 2013 19:14:08 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 62318 invoked by uid 500); 11 Oct 2013 19:14:07 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 62217 invoked by uid 99); 11 Oct 2013 19:14:06 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Oct 2013 19:14:06 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CB565915A92; Fri, 11 Oct 2013 19:14:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chirino@apache.org To: commits@activemq.apache.org Date: Fri, 11 Oct 2013 19:14:12 -0000 Message-Id: <701a58820f024492b4bd274b0adfd029@git.apache.org> In-Reply-To: <0fe45adc075c4b44ac352ea6ff5f36d4@git.apache.org> References: <0fe45adc075c4b44ac352ea6ff5f36d4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/14] git commit: If an invalid protocol name is configured on a connector generate a more descriptive error message indicating the error. If an invalid protocol name is configured on a connector generate a more descriptive error message indicating the error. git-svn-id: https://svn.apache.org/repos/asf/activemq/activemq-apollo/trunk@1508928 13f79535-47bb-0310-9956-ffa450edef68 Project: http://git-wip-us.apache.org/repos/asf/activemq-apollo/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-apollo/commit/5a36e9e0 Tree: http://git-wip-us.apache.org/repos/asf/activemq-apollo/tree/5a36e9e0 Diff: http://git-wip-us.apache.org/repos/asf/activemq-apollo/diff/5a36e9e0 Branch: refs/heads/trunk Commit: 5a36e9e0ba873e989253dd911c0cbf9e0a1a936a Parents: c0ff590 Author: Hiram R. Chirino Authored: Wed Jul 31 15:31:33 2013 +0000 Committer: Hiram R. Chirino Committed: Wed Jul 31 15:31:33 2013 +0000 ---------------------------------------------------------------------- .../main/scala/org/apache/activemq/apollo/broker/Connector.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-apollo/blob/5a36e9e0/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala ---------------------------------------------------------------------- diff --git a/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala b/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala index 868ba90..9ab6fbb 100644 --- a/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala +++ b/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Connector.scala @@ -242,7 +242,8 @@ class AcceptingConnector(val broker:Broker, val id:String) extends Connector { accepted.set(0) connected.set(0) - protocol = ProtocolFactory.get(config.protocol.getOrElse("any")).get + var protocol_name = config.protocol.getOrElse("any") + protocol = ProtocolFactory.get(protocol_name).getOrElse(throw new Exception("protocol named '"+protocol_name+"' does not exist")) transport_server = TransportFactory.bind( config.bind ) transport_server.setDispatchQueue(dispatch_queue) transport_server.setBlockingExecutor(Broker.BLOCKABLE_THREAD_POOL);