import com.technia.tvc.core.TVException;
public void someMethod() throws TVCException {
/*
* Throws an exception, using a localized message
*/
throw new TVCException("The default message", "com.acme.anapplication.error");
/*
* This example is throwing an exception, using a localized message with additional arguments.
*/
throw new TVCException("The default message", "com.acme.anapplication.error", new String[] {
"optional", "arguments", "for", "the error message"
});
/*
* Another example, which includes the "rootCause" (the exception that caused the TVCException to be thrown)
*/
new TVCException("The default message", rootCause, "com.acme.anapplication.error", new String[] {
"optional", "arguments", "for", "the error message"
});
}