checkfailed can be used for precisely while executing the validation method to return a error message instead of throw error mressage
use like :ret = checkFailed(“enter the vaule between 40 to 50.”);
or
public boolean validate()
{
boolean ret;
ret = super();
if(!tablename)
{
return checkFailed("it does not have any vaulue ");
}
return ret;
}
thow message is used in the business logic where if we encounter some error messages then the execution should be stopped.
In validation we should never use throw error message as it will stop the further validation steps.
use like :ret = checkFailed(“enter the vaule between 40 to 50.”);
or
public boolean validate()
{
boolean ret;
ret = super();
if(!tablename)
{
return checkFailed("it does not have any vaulue ");
}
return ret;
}
thow message is used in the business logic where if we encounter some error messages then the execution should be stopped.
In validation we should never use throw error message as it will stop the further validation steps.
good staff
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks , i think it return info message not error message
ReplyDelete