Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.xml.util
Class XMLError

    java.lang.Object
      |
      +--oracle.xml.util.XMLError

Direct Known Subclasses:
  XMLError

public class XMLError
extends java.lang.Object

This class hold error message and the line number where it occured

Field Summary
`protected int[]` | `col`
`protected int[]` | `errid`
`protected java.lang.Exception[]` | `exp`
`protected int[]` | `line` Information of the error occured
`protected java.lang.String[]` | `mesg`
`protected java.lang.String[]` | `pubId`
`protected java.lang.String[]` | `sysId`
`protected int[]` | `types`

Constructor Summary
`XMLError()` Default constructor

Method Summary
`void` | `error(int id, int type, java.lang.String msg)` Adds a new error to the vector
`void` | `error(int id, int type, java.lang.String[] p)` Adds a new error to the vector
`void` | `error0(int id, int type)` Adds a new error to the vector
`void` | `error1(int id, int type, java.lang.String p1)` Adds a new error to the vector
`void` | `error2(int id, int type, java.lang.String p1, java.lang.String p2)` Adds a new error to the vector
`void` | `error3(int id, int type, java.lang.String p1, java.lang.String p2, java.lang.String p3)` Adds a new error to the vector
`void` | `flushErrorStream()` Flush all the error to the ouput stream output stream defaults or to error handler
`java.lang.String` | `formatErrorMesg(int index)`
`int` | `getColumnNumber(int i)` Get the column number of error at specified index
`java.lang.Exception` | `getException(int i)` Get the exception (if exists) that occured in error at specified index
`int` | `getFirstError()`
`int` | `getLineNumber(int i)` Get the line number of error at specified index
`Locator` | `getLocator()` Return the registered locator
`java.lang.String` | `getMessage(int i)` Get the error message at specified index
`java.lang.String` | `getMessage(int errId, java.lang.String[] params)` Get error message with more than 5 arguments
`java.lang.String` | `getMessage0(int errId)` Get error message with no arguments
`java.lang.String` | `getMessage1(int errId, java.lang.String a1)` Get error message with 1 arguments
`java.lang.String` | `getMessage2(int errId, java.lang.String a1, java.lang.String a2)` Get error message with 2 arguments
`java.lang.String` | `getMessage3(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3)` Get error message with 3 arguments
`java.lang.String` | `getMessage4(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3, java.lang.String a4)` Get error message with 4 arguments
`java.lang.String` | `getMessage5(int errId, java.lang.String a1, java.lang.String a2, java.lang.String a3, java.lang.String a4, java.lang.String a5)` Get error message with 5 arguments
`int` | `getMessageType(int i)` Get the type of the error message at specified index
`int` | `getNumMessages()` Return the total number of errors/warnings found during parsing
`java.lang.String` | `getPublicId(int i)` Get the public ID of input when error at specified index occured
`java.lang.String` | `getSystemId(int i)` Get the system ID of input when error at specified index occured
`void` | `printErrorListener()` Flush all the JAXP 1.1 errors to the ErrorListener If no ErrorListener was set, default to System.err
`void` | `reset()` Reset the error class
`void` | `setErrorStream(java.io.OutputStream out)` Register a output stream
`void` | `setErrorStream(java.io.OutputStream out, java.lang.String enc)` Register a output stream
`void` | `setErrorStream(java.io.PrintWriter out)` Register a output stream
`void` | `setException(java.lang.Exception exp)` Register a exception
`void` | `setLocale(java.util.Locale locale)` Register a locale
`void` | `setLocator(Locator locator)` Register a locator
`void` | `showWarnings(boolean flag)` Turn reporting warning on/off

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### line

    protected int[] line

  Information of the error occured

### col

    protected int[] col

### types

    protected int[] types

### errid

    protected int[] errid

### mesg

    protected java.lang.String[] mesg

### sysId

    protected java.lang.String[] sysId

### pubId

    protected java.lang.String[] pubId

### exp

    protected java.lang.Exception[] exp

Constructor Detail

### XMLError

    public XMLError()

  Default constructor

Method Detail

### reset

    public void reset()

  Reset the error class

### setErrorStream

    public void setErrorStream(java.io.OutputStream out)

  Register a output stream
  Parameters:
    `out` - - OutputStream to ouput the error/warnings

### setErrorStream

    public void setErrorStream(java.io.OutputStream out,
                               java.lang.String enc)
                        throws java.io.IOException

  Register a output stream
  Parameters:
    `out` - - OutputStream to ouput the error/warnings
    `enc` - - Encoding of the outputstream
  Throws:
    `java.io.IOException` - - if an error occurs initializing the outputstream

### setErrorStream

    public void setErrorStream(java.io.PrintWriter out)

  Register a output stream
  Parameters:
    `out` - - PrintWriter to ouput the error/warnings

### showWarnings

    public void showWarnings(boolean flag)

  Turn reporting warning on/off
  Parameters:
    `flag` - - controls reporting of warnings

### setLocale

    public void setLocale(java.util.Locale locale)

  Register a locale
  Parameters:
    `locale` - - locale for error reporting

### setLocator

    public void setLocator(Locator locator)

  Register a locator
  Parameters:
    `locator` - - locater to get lin/col/sysid/pubid info

### setException

    public void setException(java.lang.Exception exp)

  Register a exception
  Parameters:
    `exp` - - last exception occured

### getLocator

    public Locator getLocator()

  Return the registered locator
  Returns:
    locator

### getFirstError

    public int getFirstError()

### getNumMessages

    public int getNumMessages()

  Return the total number of errors/warnings found during parsing
  Returns:
    The number of errors/warnings

### getMessage

    public java.lang.String getMessage(int i)

  Get the error message at specified index
  Returns:
    The error message

### getLineNumber

    public int getLineNumber(int i)

  Get the line number of error at specified index
  Returns:
    The line number

### getColumnNumber

    public int getColumnNumber(int i)

  Get the column number of error at specified index
  Returns:
    The column number

### getSystemId

    public java.lang.String getSystemId(int i)

  Get the system ID of input when error at specified index occured
  Returns:
    The system ID

### getPublicId

    public java.lang.String getPublicId(int i)

  Get the public ID of input when error at specified index occured
  Returns:
    The public ID

### getException

    public java.lang.Exception getException(int i)

  Get the exception (if exists) that occured in error at specified index
  Returns:
    The exception

### getMessageType

    public int getMessageType(int i)

  Get the type of the error message at specified index
  Returns:
    The error message type

### error

    public void error(int id,
                      int type,
                      java.lang.String msg)

  Adds a new error to the vector
  Parameters:
    `id` - - id of the error message
    `type` - - type of the error

### error0

    public void error0(int id,
                       int type)

  Adds a new error to the vector
  Parameters:
    `id` - - id of the error message
    `type` - - type of the error

### error1

    public void error1(int id,
                       int type,
                       java.lang.String p1)

  Adds a new error to the vector
  Parameters:
    `id` - - id of the error message
    `type` - - type of the error
    `p1` - - paramter 1

### error2

    public void error2(int id,
                       int type,
                       java.lang.String p1,
                       java.lang.String p2)

  Adds a new error to the vector
  Parameters:
    `id` - - id of the error message
    `type` - - type of the error
    `p1` - - paramter 1
    `p2` - - paramter 2

### error3

    public void error3(int id,
                       int type,
                       java.lang.String p1,
                       java.lang.String p2,
                       java.lang.String p3)

  Adds a new error to the vector
  Parameters:
    `id` - - id of the error message
    `type` - - type of the error
    `p1` - - paramter 1
    `p2` - - paramter 2
    `p3` - - paramter 3

### error

    public void error(int id,
                      int type,
                      java.lang.String[] p)

  Adds a new error to the vector
  Parameters:
    `id` - - id of the error message
    `type` - - type of the error
    `p` - - paramter array

### flushErrorStream

    public void flushErrorStream()
                          throws java.io.IOException

  Flush all the error to the ouput stream output stream defaults or to error handler
    `java.io.IOException`

### printErrorListener

    public void printErrorListener()
                            throws java.io.IOException

  Flush all the JAXP 1.1 errors to the ErrorListener If no ErrorListener was set, default to System.err
    `java.io.IOException`

### getMessage0

    public java.lang.String getMessage0(int errId)

  Get error message with no arguments

### getMessage1

    public java.lang.String getMessage1(int errId,
                                        java.lang.String a1)

  Get error message with 1 arguments

### getMessage2

    public java.lang.String getMessage2(int errId,
                                        java.lang.String a1,
                                        java.lang.String a2)

  Get error message with 2 arguments

### getMessage3

    public java.lang.String getMessage3(int errId,
                                        java.lang.String a1,
                                        java.lang.String a2,
                                        java.lang.String a3)

  Get error message with 3 arguments

### getMessage4

    public java.lang.String getMessage4(int errId,
                                        java.lang.String a1,
                                        java.lang.String a2,
                                        java.lang.String a3,
                                        java.lang.String a4)

  Get error message with 4 arguments

### getMessage5

    public java.lang.String getMessage5(int errId,
                                        java.lang.String a1,
                                        java.lang.String a2,
                                        java.lang.String a3,
                                        java.lang.String a4,
                                        java.lang.String a5)

  Get error message with 5 arguments

### getMessage

    public java.lang.String getMessage(int errId,
                                       java.lang.String[] params)

  Get error message with more than 5 arguments

### formatErrorMesg

    public java.lang.String formatErrorMesg(int index)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003, 2004, Oracle. All rights reserved.