Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.birt.report.model.api
Class DesignFileException

    java.lang.Object
      BirtException
          org.eclipse.birt.report.model.api.ModelException
              org.eclipse.birt.report.model.api.DesignFileException

    public class DesignFileException

extends ModelException

Signals that a fatal error occurred when opening a design file. It includes the error list. Each item in the list is an instance of `ErrorDetail`.

Four types of error are defined:

  Design file is not found. `INVALID_XML`
  Design file is not a valid xml file. `SYNTAX_ERROR`
  Design file has something conflicting MetaData definition. `SEMANTIC_ERROR`
  Design file is opened with semantic error.

  See Also:
    `ErrorDetail`

  Field Summary
  `static java.lang.String` | `DESIGN_EXCEPTION_INVALID_XML` Other exceptions thrown by SAX.
  `static java.lang.String` | `DESIGN_EXCEPTION_SEMANTIC_ERROR` The semantic error, when element doesn't conform semantic check.
  `static java.lang.String` | `DESIGN_EXCEPTION_SEMANTIC_WARNING` The semantic warning, when element doesn't conform semantic check.
  `static java.lang.String` | `DESIGN_EXCEPTION_SYNTAX_ERROR` The syntax error, when design file doesn't conform metadata definition.
  `protected java.lang.Exception` | `e` Exception thrown by SAX.
  `protected java.lang.String` | `fileName` The file name with the error.

  Fields inherited from class org.eclipse.birt.report.model.api.ModelException
  `PLUGIN_ID`

  Constructor Summary
  `DesignFileException(java.lang.String fileName, java.lang.Exception e)` Constructs a `DesignFileException` with the given design filename and the specified cause.
  `DesignFileException(java.lang.String fileName, java.util.List errList)` Constructs a `DesignFileException` with the given design filename and a list of errors.
  `DesignFileException(java.lang.String fileName, java.util.List errList, java.lang.Exception ex)` Constructs a `DesignFileException` with the given design filename, a list of errors and the new exception to add.

  Method Summary
  `java.util.List` | `getErrorList()` Returns the error list.
  `java.util.List` | `getExceptionList()` Returns the exception list.
  `java.lang.String` | `getFileName()` Returns the design file name.
  `java.lang.String` | `getLocalizedMessage()`
  `java.lang.String` | `getMessage()`
  `java.lang.String` | `toString()` Returns a string representation of the exception.

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

  Field Detail

  ### fileName

      protected java.lang.String fileName

    The file name with the error.

  ### e

      protected java.lang.Exception e

    Exception thrown by SAX.

  ### DESIGN_EXCEPTION_SYNTAX_ERROR

      public static final java.lang.String DESIGN_EXCEPTION_SYNTAX_ERROR

    The syntax error, when design file doesn't conform metadata definition.

    See Also:
      Constant Field Values

  ### DESIGN_EXCEPTION_SEMANTIC_ERROR

      public static final java.lang.String DESIGN_EXCEPTION_SEMANTIC_ERROR

    The semantic error, when element doesn't conform semantic check.

    See Also:
      Constant Field Values

  ### DESIGN_EXCEPTION_SEMANTIC_WARNING

      public static final java.lang.String DESIGN_EXCEPTION_SEMANTIC_WARNING

    The semantic warning, when element doesn't conform semantic check. However, the level of this error is warning.

    See Also:
      Constant Field Values

  ### DESIGN_EXCEPTION_INVALID_XML

      public static final java.lang.String DESIGN_EXCEPTION_INVALID_XML

    Other exceptions thrown by SAX. Generally, it's caused when design file is not a valid xml file.

    See Also:
      Constant Field Values

  Constructor Detail

  ### DesignFileException

      public DesignFileException(java.lang.String fileName,
                                 java.lang.Exception e)

    Constructs a `DesignFileException` with the given design filename and the specified cause. It is for the exception thrown by SAX.

    Parameters:
      `fileName` - design file name.
      `e` - exception to wrap.

  ### DesignFileException

      public DesignFileException(java.lang.String fileName,
                                 java.util.List errList)

    Constructs a `DesignFileException` with the given design filename and a list of errors. Used when syntax error is found when parsing.

    Parameters:
      `fileName` - design file name.
      `errList` - exception list, each of them is the syntax error.

  ### DesignFileException

      public DesignFileException(java.lang.String fileName,
                                 java.util.List errList,
                                 java.lang.Exception ex)

    Constructs a `DesignFileException` with the given design filename, a list of errors and the new exception to add. Used when syntax error is found when parsing.

    Parameters:
      `fileName` - design file name.
      `errList` - exception list, each of which is the syntax error.
      `ex` - the exception to add

  Method Detail

  ### getErrorList

      public java.util.List getErrorList()

    Returns the error list. Each item in the list is an instance of `ErrorDetail`.

    Returns:
      the error list.

  ### getExceptionList

      public java.util.List getExceptionList()

    Returns the exception list. Each item in the list is an instance of `Exception`.

    Returns:
      the exception list.

  ### getFileName

      public java.lang.String getFileName()

    Returns the design file name.

    Returns:
      the design file name.

  ### getLocalizedMessage

      public java.lang.String getLocalizedMessage()

  ### getMessage

      public java.lang.String getMessage()

  ### toString

      public java.lang.String toString()

    Returns a string representation of the exception. If the exception type is SYNTAX_ERROR or INVALID_XML, this method checks all errors in the `errorList` and assemble them into a string. The return string is assembled in the ways:

    Error Type | Message
    SYNTAX_ERROR and INVALID_XML | `[errorType]`- [numOfErrors] errors found. 1.) [detail messages.] 2.) [detail messages.] ...
    SEMANTIC_ERROR | Impossible to occur.

    Note output message are locale independent. ONLY for debugging, not user-visible. Debugging messages are defined to be in English.

    See Also:
      `Object.toString()`, `ErrorDetail.toString()`, `getLocalizedMessage()`

  Overview | Package | Class | Use | Tree | Deprecated | Index | Help
  PREV CLASS NEXT CLASS | FRAMES NO FRAMES
  SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

  Copyright © 2008 Actuate Corp. All rights reserved.