Re: Catch clause difference

2018-01-10 Thread Mohan Radhakrishnan
Yes Jochen. That worked. import org.openqa.selenium.NoSuchElementException I hadn;t imported anything. Mohan On 9 January 2018 at 22:58, Jochen Theodorou wrote: > > > Am 09.01.2018 um 16:38 schrieb Dinko Srkoč: > >> On 9 January 2018 at 13:26, Mohan Radhakrishnan >> wrote: >> >>> I don't see

Re: Catch clause difference

2018-01-09 Thread Jochen Theodorou
Am 09.01.2018 um 16:38 schrieb Dinko Srkoč: On 9 January 2018 at 13:26, Mohan Radhakrishnan wrote: I don't see java.util.NoSuchElementException anywhere. From the line: }catch( NoSuchElementException nse ){ we don't know which `NoSuchElementException` you're trying to catch (see wha

Re: Catch clause difference

2018-01-09 Thread Dinko Srkoč
On 9 January 2018 at 13:26, Mohan Radhakrishnan wrote: > I don't see java.util.NoSuchElementException anywhere. >From the line: }catch( NoSuchElementException nse ){ we don't know which `NoSuchElementException` you're trying to catch (see what is imported), but we do know that the thrown ex

Re: Catch clause difference

2018-01-09 Thread Mohan Radhakrishnan
I don't see java.util.NoSuchElementException anywhere. Mohan On 9 January 2018 at 15:05, Felix Dorner wrote: > Or the same exception class but different classloader? Either of these > two. > > On Jan 9, 2018 10:01, "Dinko Srkoč" wrote: > >> Is your `NoSuchElementException` in the catch claus

Re: Catch clause difference

2018-01-09 Thread Felix Dorner
Or the same exception class but different classloader? Either of these two. On Jan 9, 2018 10:01, "Dinko Srkoč" wrote: > Is your `NoSuchElementException` in the catch clause by any chance > `java.util.NoSuchElementException`? > > cheers, > Dinko > > On 8 January 2018 at 16:18, Mohan Radhakrishn

Re: Catch clause difference

2018-01-09 Thread Dinko Srkoč
Is your `NoSuchElementException` in the catch clause by any chance `java.util.NoSuchElementException`? cheers, Dinko On 8 January 2018 at 16:18, Mohan Radhakrishnan wrote: > In the second case it is this. > > org.openqa.selenium.NoSuchElementException > > In the first case this seems to escape o

Re: Catch clause difference

2018-01-08 Thread Mohan Radhakrishnan
In the second case it is this. org.openqa.selenium.NoSuchElementException In the first case this seems to escape out. So I changed my first clause to this. }catch( NoSuchElementException nse ){ print "Catch clause " + nse }catch( Exception e ){ print "Catch clause " + e } It prints org

Re: Catch clause difference

2018-01-08 Thread Paul King
What does printing out `nse` in both cases show? On Mon, Jan 8, 2018 at 11:02 PM, Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > Hello, > > These catch clauses are somehow different from each other. Why ? > > In the first case 'NoSuchElementException' is somehow escaping the > 'ca

Catch clause difference

2018-01-08 Thread Mohan Radhakrishnan
Hello, These catch clauses are somehow different from each other. Why ? In the first case 'NoSuchElementException' is somehow escaping the 'catch' block. My test fails. But the second clause succeeds as expected. Clause 1 : catch( NoSuchElementException nse ){ throw new NoSuchWidgetExcep