Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    8
    Views
    1,533

    Re: Loop & custom exception error Please help

    Your use of the error variable is reversed. You want to change its value when a match is found. A better name for the variable would be matchFound.
    Then at the end of the loop the code can test...
  2. Replies
    8
    Views
    1,533

    Re: Loop & custom exception error Please help

    Have you solved the problem?

    Please edit your post and wrap your code with code tags:


    <YOUR CODE HERE>

    to get highlighting and preserve formatting.
  3. Replies
    8
    Views
    1,533

    Re: Loop & custom exception error Please help

    Post the code that shows what you did.
  4. Replies
    8
    Views
    1,533

    Re: Loop & custom exception error Please help

    The posted code throws the exception on the first non-match.
    A better way would be to only throw the exception after all of the items in the list had been examined and no match had been found. Use...
Results 1 to 4 of 4