Class DesignFileException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.eclipse.birt.core.exception.BirtException
org.eclipse.birt.report.model.api.ModelException
org.eclipse.birt.report.model.api.DesignFileException
- All Implemented Interfaces:
Serializable
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.
- Design file is not a valid xml file.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringOther exceptions thrown by SAX.static final StringThe semantic error, when element doesn't conform semantic check.static final StringThe semantic warning, when element doesn't conform semantic check.static final StringThe syntax error, when design file doesn't conform metadata definition.protected ExceptionException thrown by SAX.protected StringThe file name with the error.Fields inherited from class org.eclipse.birt.report.model.api.ModelException
PLUGIN_IDFields inherited from class org.eclipse.birt.core.exception.BirtException
CANCEL, ERROR, INFO, oaMessageArguments, OK, pluginId, rb, severity, sResourceKey, WARNING -
Constructor Summary
ConstructorsConstructorDescriptionDesignFileException(String fileName, Exception e) Constructs aDesignFileExceptionwith the given design filename and the specified cause.DesignFileException(String fileName, List<? extends Exception> errList) Constructs aDesignFileExceptionwith the given design filename and a list of errors.DesignFileException(String fileName, List<? extends Exception> errList, Exception ex) Constructs aDesignFileExceptionwith the given design filename, a list of errors and the new exception to add. -
Method Summary
Modifier and TypeMethodDescriptionReturns the error list.Returns the exception list.Returns the design file name.toString()Returns a string representation of the exception.Methods inherited from class org.eclipse.birt.core.exception.BirtException
getErrorCode, getLocalizedMessage, getPluginId, getSeverity, setSeverityMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
fileName
The file name with the error. -
e
Exception thrown by SAX. -
DESIGN_EXCEPTION_SYNTAX_ERROR
The syntax error, when design file doesn't conform metadata definition.- See Also:
-
DESIGN_EXCEPTION_SEMANTIC_ERROR
The semantic error, when element doesn't conform semantic check.- See Also:
-
DESIGN_EXCEPTION_SEMANTIC_WARNING
The semantic warning, when element doesn't conform semantic check. However, the level of this error is warning.- See Also:
-
DESIGN_EXCEPTION_INVALID_XML
Other exceptions thrown by SAX. Generally, it's caused when design file is not a valid xml file.- See Also:
-
-
Constructor Details
-
DesignFileException
Constructs aDesignFileExceptionwith 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
Constructs aDesignFileExceptionwith 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
Constructs aDesignFileExceptionwith 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 Details
-
getErrorList
Returns the error list. Each item in the list is an instance ofErrorDetail.- Returns:
- the error list.
-
getExceptionList
Returns the exception list. Each item in the list is an instance ofException.- Returns:
- the exception list.
-
getFileName
Returns the design file name.- Returns:
- the design file name.
-
getLocalizedMessage
- Overrides:
getLocalizedMessagein classorg.eclipse.birt.core.exception.BirtException
-
getMessage
- Overrides:
getMessagein classorg.eclipse.birt.core.exception.BirtException
-
toString
Returns a string representation of the exception. If the exception type is SYNTAX_ERROR or INVALID_XML, this method checks all errors in theerrorListand assemble them into a string. The return string is assembled in the ways:
Note output message are locale independent. ONLY for debugging, not user-visible. Debugging messages are defined to be in English.Error Type Message SYNTAX_ERROR and INVALID_XML [errorType]- [numOfErrors] errors found.
1.) [detail messages.]
2.) [detail messages.]
...
SEMANTIC_ERROR Impossible to occur.
-