Here are your options:
1) Use
out parameter[
^] to pass the error message. So the message is available to the calling function.
2) Return
String
from your method instead of
Boolean
. So, in the calling function, this will be the case:
String valid = someMethod();
if (valid == "true")
{
}
else
{
}
Hope this helps!