Databases Reference
In-Depth Information
Custom error messages
At imes, you will want to display a custom message for error messages that are triggered
from the framework. For example, if the precision of an atribute is not met, the framework
will throw an error saying
Invalid precision/scale
.
In order to display a different message for this message, you will have to define a custom
error message in the project's properies. Go to
Project Properies
|
Business Components
|
Opions
to define a new class named
MessageBundle.java
.
The bundle class will have the deiniion shown in the following code:
public class MessageBundle
extends ListResourceBundle {
private static final Object[][]
sMessageStrings = new String[][] {
{CSMessageBundle.EXC_VAL_PRECISION_VALIDATOR,
"Limit Exceeded"}
};
protected Object[][] getContents() {
return sMessageStrings;
}
}
Search WWH ::
Custom Search