Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2972 - development/main/transit/core/handler/src/main/net/dpml/transit/artifact

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2972 - development/main/transit/core/handler/src/main/net/dpml/transit/artifact
  • Date: Mon, 04 Jul 2005 21:43:50 -0400

Author: mcconnell AT dpml.net
Date: Mon Jul 4 21:43:50 2005
New Revision: 2972

Added:

development/main/transit/core/handler/src/main/net/dpml/transit/artifact/MissingGroupException.java
Modified:

development/main/transit/core/handler/src/main/net/dpml/transit/artifact/Artifact.java
Log:
Add explicit missing group exception.

Modified:
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/Artifact.java
==============================================================================
---
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/Artifact.java
(original)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/Artifact.java
Mon Jul 4 21:43:50 2005
@@ -128,6 +128,12 @@
throw new NullArgumentException( "uri" );
}
String scheme = uri.getScheme();
+ if( null == scheme )
+ {
+ final String error =
+ "URI does not declare a scheme: " + uri;
+ throw new UnsupportedSchemeException( error );
+ }
if( !scheme.equals( "artifact" ) && !scheme.equals( "link" ) )
{
final String error =
@@ -248,9 +254,9 @@
else
{
final String error =
- "Supplied artifact specification ["
+ "Artifact specification ["
+ uri + "] does not contain a group.";
- throw new IllegalArgumentException( error );
+ throw new MissingGroupException( error );
}

//

Added:
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/MissingGroupException.java
==============================================================================
--- (empty file)
+++
development/main/transit/core/handler/src/main/net/dpml/transit/artifact/MissingGroupException.java
Mon Jul 4 21:43:50 2005
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004-2005 Stephen J. McConnell.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package net.dpml.transit.artifact;
+
+/**
+ * Exception to indicate that the group component of an artifact uri
+ * was not found.
+ *
+ * @author <a href="http://www.dpml.net";>The Digital Product Meta Library</a>
+ */
+public class MissingGroupException extends IllegalArgumentException
+{
+ //
------------------------------------------------------------------------
+ // constructor
+ //
------------------------------------------------------------------------
+
+ /**
+ * Construct a new <code>MissingGroupException </code> instance.
+ *
+ * @param message The detail message for this exception.
+ */
+ public MissingGroupException( String message )
+ {
+ super( message );
+ }
+}
+



  • svn commit: r2972 - development/main/transit/core/handler/src/main/net/dpml/transit/artifact, mcconnell, 07/04/2005

Archive powered by MHonArc 2.6.24.

Top of Page