Guard loop with st.hasMoreTokens() instead of exception handler.