Only way I can think of is to have the method throw an exception, like this:
public int someMethod(int input) throws SomeException
{
if(input <= 0)
{
throw new SomeException("Input must be greater than zero.");
}
else
{
//do something
return something;
}
}
Greetings
Felissa