Try with more than one catch block

Bug reports.
Geci
Posts: 15
Joined: Fri Sep 06, 2013 1:16 pm

Try with more than one catch block

Post by Geci » Mon May 12, 2014 3:44 pm

Hello,

i found follwoing bug:

Code: Select all

try
{
   throw Exception();
}
catch(NullReferenceException exc)
{
  // Some Code
}
catch(Exception exc)
{
  // Some Code
}
When i use the intellisense for exc (Exception catch block), Ranorex shows me null!

With this code Ranorex shows me the right exception:

Code: Select all

try
{
   throw Exception();
}
catch(NullReferenceException exc1)
{
  // Some Code
}
catch(Exception exc2)
{
  // Some Code
}
Ranorex Studio
Version 4.1.4.16685
.NET Runtime Version 4.0.30319.18444

Sincere regards,
GeCi

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Try with more than one catch block

Post by Support Team » Tue May 13, 2014 2:53 pm

Hello Geci,

Unfortunately we were not able to reproduce this issue using Ranorex 4.1.4.
The syntax looks fine as well, but maybe you are missing a parenthesis somewhere within your user code?
If not, I would suggest doing a clean re-install of Ranorex.
  • 1. Uninstall Ranorex completely from your machine.
    2. Reboot your machine.
    3. Re-install Ranorex.
Please let me know if that resolves your issue.

Regards,
Robert
.
Image

Geci
Posts: 15
Joined: Fri Sep 06, 2013 1:16 pm

Re: Try with more than one catch block

Post by Geci » Tue May 13, 2014 3:04 pm

Here is a screenshot:
Attachments
Bug.png
Bug.png (171.16 KiB) Viewed 1322 times

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Try with more than one catch block

Post by krstcs » Tue May 13, 2014 3:51 pm

This is a bug in SharpDevelop 3.2 (which Ranorex is built on) and may not be correctable by Ranorex.
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Try with more than one catch block

Post by Support Team » Wed May 14, 2014 1:54 pm

Hi,

Thank you for the clarification GeCi.

krstcs is exactly right. Unfortunately we can’t change this behavior without having a big effort.
Thank you for your understanding.

Regards,
Robert
.
Image

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3937
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Try with more than one catch block

Post by odklizec » Wed May 14, 2014 2:07 pm

Hi Robert,

It would be really great to have Ranorex updated with more recent version of SharpDevelop. I know it's not an easy task. But considering SD 3.2 is about 4 years, it's probably about a time to have Ranorex GUI updated? I'm sure the number of bug fixes and improvements would be worth that effort? ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Try with more than one catch block

Post by krstcs » Wed May 14, 2014 2:27 pm

There are already a couple of threads asking for this, and they have said they are looking into it, but as you say, it will be a large undertaking and will take some time.

And the other question is, what version do they go to? SD 4.X has been out for a while already, but they just released the betas for SD 5.0, so it will be available shortly. Do they wait for 5.0 to become stable (5.1/5.2), when 6.0 might be out by the time they finish the upgrade to Ranorex? Or do they go with 4.X and be behind the curve again?

My thought is that they should decouple it a bit more from SD so that upgrades to SD don't cause them to have to start over, but I'm not sure if that can be done given all of the changes they make to SD to get Ranorex to work.

I'm just glad they are looking at it. :D
Shortcuts usually aren't...

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3937
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Try with more than one catch block

Post by odklizec » Wed May 14, 2014 2:40 pm

Yeah, you are right. It's complicated task and true enough, it's hard to decide what version of SD should be used considering 5.0 is not stable yet. On the other hand, waiting as long as 4 years makes the update process a real nightmare due to a number of changes done during that long period of time. I agree it would be really nice to see Ranorex more independent from SD core to make it easier updateable. Maybe in form of SD addin? Who knows? I personally don't suffer from any unbeatable error, like the one mentioned in this topic, but it would be really nice to see some of the latest SD workflow enhancements. Let's wait (hope) and see ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration