Package org.eclipse.birt.report.model.api.css

# Class StyleSheetParserException

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.css.StyleSheetParserException

All Implemented Interfaces:
  `Serializable`

public class StyleSheetParserException extends ModelException
Exception thrown if an error occurs when translating an external style sheet to our own `CssStyleSheet`. It records all the details about the handler.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`DESIGN_EXCEPTION_INVALID_SHORT_HAND_CSSPROPERTY_VALUE`
The value of the short-hand property is invalid to CSS2.
`static final String`
`DESIGN_EXCEPTION_INVALID_SIMPLE_CSSPROPERTY_VALUE`
The property value is invalid to Model ROM.
`static final String`
`DESIGN_EXCEPTION_PROPERTY_NOT_SUPPORTED`
The CSS property is not supported by BIRT.
`static final String`
`DESIGN_EXCEPTION_RULE_NOT_SUPPORTED`
The rule is not supported.
`static final String`
`DESIGN_EXCEPTION_STYLE_NOT_SUPPORTED`
The style is not supported.

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

`PLUGIN_ID`

### Fields inherited from class org.eclipse.birt.core.exception.BirtException

`CANCEL, ERROR, INFO, oaMessageArguments, OK, pluginId, rb, severity, sResourceKey, WARNING`

## Constructor Summary

Constructors
Constructor
Description
`StyleSheetParserException(String name, String errCode)`
Constructs the parser exception with the error code.
`StyleSheetParserException(String errCode, String propName, String value)`
Constructs a parser exception with the error code and string arguments used to format error messages.
`StyleSheetParserException(String errCode, String propName, String value, Throwable cause)`
Constructs a parser exception with the error code, string arguments used to format error messages and nested exception.

## Method Summary

Modifier and Type
Method
Description
`String`
`getCSSPropertyName()`
Gets the CSS property name.
`String`
`getCSSValue()`
Gets the CSS property text.
`String`
`getLocalizedMessage()`
`String`
`getName()`
Gets the name of the style or rule which has the errors.

### Methods inherited from class org.eclipse.birt.core.exception.BirtException

`getErrorCode, getLocalizedMessage, getMessage, getPluginId, getSeverity, setSeverity`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### DESIGN_EXCEPTION_RULE_NOT_SUPPORTED

public static final String DESIGN_EXCEPTION_RULE_NOT_SUPPORTED
The rule is not supported. BIRT only supports the style rules other than media rules, page rules, charset rules and so on.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_STYLE_NOT_SUPPORTED

public static final String DESIGN_EXCEPTION_STYLE_NOT_SUPPORTED
The style is not supported. BIRT only support selectors like H1, p.table and .table. All other kinds of selectors are not supported.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_PROPERTY_NOT_SUPPORTED

public static final String DESIGN_EXCEPTION_PROPERTY_NOT_SUPPORTED
The CSS property is not supported by BIRT.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_INVALID_SHORT_HAND_CSSPROPERTY_VALUE

public static final String DESIGN_EXCEPTION_INVALID_SHORT_HAND_CSSPROPERTY_VALUE
The value of the short-hand property is invalid to CSS2.

See Also:
  - Constant Field Values

### DESIGN_EXCEPTION_INVALID_SIMPLE_CSSPROPERTY_VALUE

public static final String DESIGN_EXCEPTION_INVALID_SIMPLE_CSSPROPERTY_VALUE
The property value is invalid to Model ROM.

See Also:
  - Constant Field Values

## Constructor Details

### StyleSheetParserException

public StyleSheetParserException(String name, String errCode)
Constructs the parser exception with the error code.

Parameters:
  `name` - the name of the style or rule which has errors
  `errCode` - the error code of the exception

### StyleSheetParserException

public StyleSheetParserException(String errCode, String propName, String value)
Constructs a parser exception with the error code and string arguments used to format error messages.

Parameters:
  `errCode` - used to retrieve a piece of externalized message displayed to end user
  `propName` - the property name
  `value` - the property value

### StyleSheetParserException

public StyleSheetParserException(String errCode, String propName, String value, Throwable cause)
Constructs a parser exception with the error code, string arguments used to format error messages and nested exception.

Parameters:
  `errCode` - used to retrieve a piece of externalized message displayed to end user
  `propName` - the property name
  `value` - the property value
  `cause` - the nested exception

## Method Details

### getName

public String getName()
Gets the name of the style or rule which has the errors.

Returns:
  the name of the style or the rule

### getCSSPropertyName

public String getCSSPropertyName()
Gets the CSS property name.

Returns:
  the CSS property name

### getCSSValue

public String getCSSValue()
Gets the CSS property text.

Returns:
  the CSS property text

### getLocalizedMessage

public String getLocalizedMessage()

Overrides:
  `getLocalizedMessage` in class `org.eclipse.birt.core.exception.BirtException`