I traverse an array of bytes in a Try...Catch block. Something like this:
Try
For Each curByte In bytes
'Do something with bytes.
Next
Return encodedBytes
Catch e As Exception
'handle exception
End Try
Randomly, my program will crash with an unhandled exception on the Next statement in the code block above. The exception is a StackOverflow in mscorlib.dll "unable to evaluate expression".
Why is my exception handling not handling the exception? I'm not sure I know where to begin trying to address this error.