I need to do something like this:
while(prot.getProcessedTranscriptPositionFromAA(start) == null) start++;
But because prot throws NullPointerException I cannot loop like this. How can I create a loop that catches the NullPointerException, increments start, and executes getProcessedTranscriptPositionFromAA again ,and so on, until getProcessedTranscriptPositionFromAA will not throw NullPointerException ("it's ok" that the loop have the possibility to be infinite).
I never used goto and I don't even know how to use is, but will something like this will work somehow?:
*here*
try{
prot.getProcessedTranscriptPositionFromAA(start);
}
catch (NullPointerException e){
start++;
goto *here*
}