Skip to Content.
Sympa Menu

notify-dpml - r1973 - in trunk/main: depot/library/src/main/dpml/library/impl depot/library/src/main/dpml/library/info metro/part/src/main/dpml/lang

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1973 - in trunk/main: depot/library/src/main/dpml/library/impl depot/library/src/main/dpml/library/info metro/part/src/main/dpml/lang
  • Date: Mon, 16 Apr 2007 19:06:53 +0200

Author: mcconnell
Date: 2007-04-16 19:06:51 +0200 (Mon, 16 Apr 2007)
New Revision: 1973

Modified:
trunk/main/depot/library/src/main/dpml/library/impl/DefaultLibrary.java
trunk/main/depot/library/src/main/dpml/library/info/LibraryDecoder.java
trunk/main/metro/part/src/main/dpml/lang/DOM3DocumentBuilder.java
Log:
1. trigger runtime exception following schema warning instead of logging
warning messages
2. simplify error messages

Modified:
trunk/main/depot/library/src/main/dpml/library/impl/DefaultLibrary.java
===================================================================
--- trunk/main/depot/library/src/main/dpml/library/impl/DefaultLibrary.java
2007-04-16 16:41:28 UTC (rev 1972)
+++ trunk/main/depot/library/src/main/dpml/library/impl/DefaultLibrary.java
2007-04-16 17:06:51 UTC (rev 1973)
@@ -60,7 +60,7 @@
private final Hashtable<String,DefaultResource> m_anonymous =
new Hashtable<String,DefaultResource>();

- private static LibraryDirective buildLibraryDirective( File source )
throws Exception
+ private static LibraryDirective buildLibraryDirective( final File source
) throws Exception
{
return LIBRARY_DECODER.build( source );
}
@@ -71,7 +71,7 @@
* @param logger the assigned logging channel
* @exception Exception if an error occurs during defintion loading
*/
- public DefaultLibrary( Logger logger ) throws Exception
+ public DefaultLibrary( final Logger logger ) throws Exception
{
this( logger, resolveLibrarySource() );
}
@@ -82,7 +82,7 @@
* @param source the index source defintion
* @exception Exception if an error occurs during defintion loading
*/
- public DefaultLibrary( Logger logger, File source ) throws Exception
+ public DefaultLibrary( final Logger logger, final File source ) throws
Exception
{
super( null, buildLibraryDirective( source ) );


Modified:
trunk/main/depot/library/src/main/dpml/library/info/LibraryDecoder.java
===================================================================
--- trunk/main/depot/library/src/main/dpml/library/info/LibraryDecoder.java
2007-04-16 16:41:28 UTC (rev 1972)
+++ trunk/main/depot/library/src/main/dpml/library/info/LibraryDecoder.java
2007-04-16 17:06:51 UTC (rev 1973)
@@ -59,7 +59,7 @@
* @return the library directive
* @exception IOException if an IO exception occurs
*/
- public LibraryDirective build( File source ) throws IOException
+ public LibraryDirective build( final File source ) throws IOException
{
if( null == source )
{

Modified: trunk/main/metro/part/src/main/dpml/lang/DOM3DocumentBuilder.java
===================================================================
--- trunk/main/metro/part/src/main/dpml/lang/DOM3DocumentBuilder.java
2007-04-16 16:41:28 UTC (rev 1972)
+++ trunk/main/metro/part/src/main/dpml/lang/DOM3DocumentBuilder.java
2007-04-16 17:06:51 UTC (rev 1973)
@@ -158,7 +158,7 @@
{
throw e;
}
- catch( Exception e )
+ catch( Throwable e )
{
final String error =
"Unable to decode document [" + url + "]";
@@ -236,12 +236,9 @@
if( "link:xsd:dpml/lang/dpml-module#1.0".equals( namespace ) )
{
final String error =
- "Namespace resolution error (migration issue)."
- + "\n\nThe document namespace
\"link:xsd:dpml/lang/dpml-module#1.0\" has been "
- + "replaced by the namespace \"dpml:library\". In
addition a number "
- + "of internal changes have been made to the schema
definition. These changes impact "
- + "all index files and any imported module and/or project
definition files.";
- throw new LSException( LSException.PARSE_ERR, error );
+ "The document namespace
\"link:xsd:dpml/lang/dpml-module#1.0\" has been "
+ + "replaced by \"dpml:library\".";
+ throw new LSException( LSException.PARSE_ERR, error );
}
else if( "link:xsd:dpml/lang/dpml-part#1.0".equals( namespace ) )
{
@@ -249,7 +246,7 @@
"Namespace resolution error (migration issue)."
+ "\n\nThe document namespace
\"link:xsd:dpml/lang/dpml-part#1.0\" has been "
+ "replaced by the namespace \"dpml:part\".";
- throw new LSException( LSException.PARSE_ERR, error );
+ throw new LSException( LSException.PARSE_ERR, error );
}
else
{
@@ -317,12 +314,12 @@
short severity = error.getSeverity();
if( severity == DOMError.SEVERITY_WARNING )
{
- m_logger.warn( notice );
- return true;
+ //m_logger.warn( notice );
+ //return true;
+ return false;
}
else
{
- m_logger.error( notice );
return false;
}
}




  • r1973 - in trunk/main: depot/library/src/main/dpml/library/impl depot/library/src/main/dpml/library/info metro/part/src/main/dpml/lang, mcconnell at BerliOS, 04/16/2007

Archive powered by MHonArc 2.6.24.

Top of Page