maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r636308 - in /maven/doxia/doxia/trunk/doxia-modules: doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/ doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ doxia-module-fml/src/main/java/org/apache...
Date Wed, 12 Mar 2008 13:00:06 GMT
Author: vsiveton
Date: Wed Mar 12 06:00:00 2008
New Revision: 636308

URL: http://svn.apache.org/viewvc?rev=636308&view=rev
Log:
o review exceptions calls

Modified:
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java?rev=636308&r1=636307&r2=636308&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptParser.java
Wed Mar 12 06:00:00 2008
@@ -286,7 +286,8 @@
         }
         catch ( AptParseException ape )
         {
-            throw new AptParseException( ape.getMessage(), getSourceName(), getSourceLineNumber(),
ape );
+            // TODO handle column number
+            throw new AptParseException( ape.getMessage(), ape, getSourceName(), getSourceLineNumber(),
-1 );
         }
     }
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java?rev=636308&r1=636307&r2=636308&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-apt/src/main/java/org/apache/maven/doxia/module/apt/AptReaderSource.java
Wed Mar 12 06:00:00 2008
@@ -71,7 +71,8 @@
         }
         catch ( IOException e )
         {
-            throw new AptParseException( e );
+            // TODO handle column number
+            throw new AptParseException( "IOException: " + e.getMessage(), e, lineNumber,
-1 );
         }
 
         return line;

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java?rev=636308&r1=636307&r2=636308&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-confluence/src/main/java/org/apache/maven/doxia/module/confluence/ConfluenceParser.java
Wed Mar 12 06:00:00 2008
@@ -125,13 +125,10 @@
         {
             blocks = parse( src  );
         }
-        catch ( ParseException e )
-        {
-            throw e;
-        }
         catch ( Exception e )
         {
-            throw new ParseException( e, src.getName(), src.getLineNumber() );
+            // TODO handle column number
+            throw new ParseException( e, src.getName(), src.getLineNumber(), -1 );
         }
 
         sink.head();

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java?rev=636308&r1=636307&r2=636308&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
Wed Mar 12 06:00:00 2008
@@ -79,18 +79,7 @@
         // this populates faqs
         super.parse( source, sink );
 
-        try
-        {
-            writeFaqs( faqs, sink );
-        }
-        catch ( XmlPullParserException e )
-        {
-            throw new ParseException( "Error creating sink: " + e.getMessage(), e );
-        }
-        catch ( IOException e )
-        {
-            throw new ParseException( "Error writing to sink: " + e.getMessage(), e );
-        }
+        writeFaqs( faqs, sink );
     }
 
     /** {@inheritDoc} */
@@ -278,12 +267,10 @@
      *
      * @param faqs The faqs to emit.
      * @param sink The sink to consume the event.
-     * @throws IOException if something goes wrong.
-     * @throws XmlPullParserException if something goes wrong.
      * @throws ParseException if something goes wrong.
      */
     private void writeFaqs( Faqs faqs, Sink sink )
-        throws IOException, XmlPullParserException, ParseException
+        throws ParseException
     {
         FmlContentParser xdocParser = new FmlContentParser();
         xdocParser.enableLogging( getLog() );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java?rev=636308&r1=636307&r2=636308&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-twiki/src/main/java/org/apache/maven/doxia/module/twiki/TWikiParser.java
Wed Mar 12 06:00:00 2008
@@ -152,7 +152,7 @@
             }
             if ( !accepted )
             {
-                throw new ParseException( "don't  know how to handle line: " + source.getLineNumber()
+ ": " + line );
+                throw new ParseException( "Line number not handle : " + source.getLineNumber()
+ ": " + line );
             }
         }
 
@@ -171,13 +171,10 @@
         {
             blocks = parse( src );
         }
-        catch ( final ParseException e )
-        {
-            throw e;
-        }
         catch ( final Exception e )
         {
-            throw new ParseException( e, src.getName(), src.getLineNumber() );
+            // TODO handle column number
+            throw new ParseException( e, src.getName(), src.getLineNumber(), -1 );
         }
 
         sink.head();
@@ -244,7 +241,6 @@
                     }
                 }
             }
-
         }
 
         return title;



Mime
View raw message