InvocationExecuteException ite=(InvocationExecuteException)cause;
msg=ite.getCause().getMessage();
}
else if(cause instanceof ConvertExecuteException)
{
ConvertException cvte=((ConvertExecuteException)cause).getCause();
if(cvte instanceof ParamConvertException)
{
ParamConvertException pce=(ParamConvertException)cvte;
msg="The parameter [name: \""+pce.getParamName()+"\", value: \""+pce.getSourceObject()+"\"]";
Type targetType=pce.getTargetType();
if(Integer.class.equals(targetType)
|| int.class.equals(targetType))
msg+=" is not valid integer.";
else
msg+=" is invalid";
}
else
msg+=cvte.getMessage();
}
else
msg="unknown error";
return msg+" (\""+execution.getExecutable().getName()+"\")";