You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by le...@locus.apache.org on 2000/02/05 03:24:16 UTC
cvs commit: xml-xerces/java/src/org/apache/xml/serialize BaseMarkupSerializer.java HTMLSerializer.java HTMLdtd.java SerializerFactoryImpl.java XMLSerializer.java
lehors 00/02/04 18:24:16
Modified: java/src/org/apache/xml/serialize BaseMarkupSerializer.java
HTMLSerializer.java HTMLdtd.java
SerializerFactoryImpl.java XMLSerializer.java
Log:
changed exception messages for NLS
Revision Changes Path
1.8 +5 -5 xml-xerces/java/src/org/apache/xml/serialize/BaseMarkupSerializer.java
Index: BaseMarkupSerializer.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/BaseMarkupSerializer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- BaseMarkupSerializer.java 2000/02/04 03:29:57 1.7
+++ BaseMarkupSerializer.java 2000/02/05 02:24:15 1.8
@@ -288,7 +288,7 @@
public void setOutputCharStream( Writer output )
{
if ( output == null )
- throw new NullPointerException( "Argument 'output' is null." );
+ throw new NullPointerException( "SER001 Argument 'output' is null." );
_writer = output;
reset();
}
@@ -297,7 +297,7 @@
public void setOutputFormat( OutputFormat format )
{
if ( format == null )
- throw new NullPointerException( "Argument 'format' is null." );
+ throw new NullPointerException( "SER001 Argument 'format' is null." );
_format = format;
// Determine the last printable character based on the output format
_lastPrintable = _format.getLastPrintable();
@@ -337,7 +337,7 @@
throws IOException
{
if ( _writer == null )
- throw new IllegalStateException( "No writer supplied for serializer" );
+ throw new IllegalStateException( "SER002 No writer supplied for serializer" );
try {
startDocument();
} catch ( SAXException except ) { }
@@ -361,7 +361,7 @@
throws IOException
{
if ( _writer == null )
- throw new IllegalStateException( "No writer supplied for serializer" );
+ throw new IllegalStateException( "SER002 No writer supplied for serializer" );
try {
startDocument();
} catch ( SAXException except ) { }
@@ -385,7 +385,7 @@
throws IOException
{
if ( _writer == null )
- throw new IllegalStateException( "No writer supplied for serializer" );
+ throw new IllegalStateException( "SER002 No writer supplied for serializer" );
try {
startDocument();
} catch ( SAXException except ) { }
1.8 +2 -2 xml-xerces/java/src/org/apache/xml/serialize/HTMLSerializer.java
Index: HTMLSerializer.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/HTMLSerializer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- HTMLSerializer.java 2000/02/04 03:29:57 1.7
+++ HTMLSerializer.java 2000/02/05 02:24:15 1.8
@@ -225,7 +225,7 @@
// Do nothing for HTML/XHTML, browser might not respond
// well to <?xml ...?>
if ( _writer == null )
- throw new IllegalStateException( "No writer supplied for serializer" );
+ throw new IllegalStateException( "SER002 No writer supplied for serializer" );
}
@@ -238,7 +238,7 @@
String value;
if ( _writer == null )
- throw new IllegalStateException( "No writer supplied for serializer" );
+ throw new IllegalStateException( "SER002 No writer supplied for serializer" );
state = getElementState();
if ( state == null ) {
1.5 +3 -3 xml-xerces/java/src/org/apache/xml/serialize/HTMLdtd.java
Index: HTMLdtd.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/HTMLdtd.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HTMLdtd.java 2000/02/04 03:29:57 1.4
+++ HTMLdtd.java 2000/02/05 02:24:15 1.5
@@ -467,7 +467,7 @@
_byChar = new Hashtable();
is = HTMLdtd.class.getResourceAsStream( ENTITIES_RESOURCE );
if ( is == null )
- throw new RuntimeException( "The resource [" + ENTITIES_RESOURCE + "] could not be found." );
+ throw new RuntimeException( "SER003 The resource [" + ENTITIES_RESOURCE + "] could not be found.\n" + ENTITIES_RESOURCE);
reader = new BufferedReader( new InputStreamReader( is ) );
line = reader.readLine();
while ( line != null )
@@ -498,8 +498,8 @@
}
catch ( Exception except )
{
- throw new RuntimeException( "The resource [" + ENTITIES_RESOURCE + "] could not load: " +
- except.toString() );
+ throw new RuntimeException( "SER003 The resource [" + ENTITIES_RESOURCE + "] could not load: " +
+ except.toString() + "\n" + ENTITIES_RESOURCE + "\t" + except.toString());
}
finally
{
1.2 +2 -2 xml-xerces/java/src/org/apache/xml/serialize/SerializerFactoryImpl.java
Index: SerializerFactoryImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/SerializerFactoryImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SerializerFactoryImpl.java 2000/01/03 19:38:50 1.1
+++ SerializerFactoryImpl.java 2000/02/05 02:24:15 1.2
@@ -88,7 +88,7 @@
! _method.equals( Method.HTML ) &&
! _method.equals( Method.XHTML ) &&
! _method.equals( Method.TEXT ) )
- throw new IllegalArgumentException( "The method '" + method + "' is not supported by this factory" );
+ throw new IllegalArgumentException( "SER004 The method '" + method + "' is not supported by this factory\n" + method);
}
@@ -137,7 +137,7 @@
} else if ( _method.equals( Method.TEXT ) ) {
return new TextSerializer( format );
} else {
- throw new IllegalStateException( "The method '" + _method + "' is not supported by this factory" );
+ throw new IllegalStateException( "SER005 The method '" + _method + "' is not supported by this factory\n" + _method);
}
}
1.8 +2 -2 xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java
Index: XMLSerializer.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xml/serialize/XMLSerializer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XMLSerializer.java 2000/01/15 00:20:46 1.7
+++ XMLSerializer.java 2000/02/05 02:24:15 1.8
@@ -177,7 +177,7 @@
public void startDocument()
{
if ( _writer == null )
- throw new IllegalStateException( "No writer supplied for serializer" );
+ throw new IllegalStateException( "SER002 No writer supplied for serializer" );
// Nothing to do here. All the magic happens in startDocument(String)
}
@@ -191,7 +191,7 @@
String value;
if ( _writer == null )
- throw new IllegalStateException( "No writer supplied for serializer" );
+ throw new IllegalStateException( "SER002 No writer supplied for serializer" );
state = getElementState();
if ( state == null ) {