execution comes from catch to try

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Thread Solved
Reply

Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

execution comes from catch to try

 
0
  #1
Apr 20th, 2009
i have the following code :

  1. static IScanningService scanningLayer = null;
  2. public static IScanningService BarcodeReader
  3. {
  4. get
  5. {
  6. if (scanningLayer == null)
  7. {
  8. string serviceName = GetServiceName();
  9. try
  10. {
  11. if (deviceService == null)
  12. deviceService = Assembly.Load(serviceName);
  13. object o = deviceService.CreateInstance(serviceName + ".BarcodeReader");
  14. scanningLayer = o as IScanningService;
  15. scanningLayer.AutoStartScan = Global.device.AutoStartScan;
  16. scanningLayer.PauseTime = Global.device.PauseTime;
  17. scanningLayer.ScanTime = Global.device.ScanTime;
  18. }
  19. catch (Exception ex)
  20. {
  21. if (ex.InnerException == null)
  22. {
  23. ErrorForm err = new ErrorForm();
  24. err.ShowDialog();
  25. //MessageBox.Show(ex.Message);
  26.  
  27. //throw new ApplicationException(
  28. // string.Format(Properties.Resources.FailedToLoad, serviceName), ex);
  29. }
  30. //throw ex;
  31. }
  32. }
  33. return scanningLayer;
  34. }
  35. }
for the first time in my life i see that after executing catch it comes back to try and starts infinite loop. Any explanation?
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: execution comes from catch to try

 
0
  #2
Apr 20th, 2009
Strange!! Did you debug it?
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 2,052
Reputation: serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light serkan sendur is a glorious beacon of light 
Solved Threads: 118
Featured Poster
serkan sendur serkan sendur is offline Offline
Postaholic

Re: execution comes from catch to try

 
0
  #3
Apr 21st, 2009
Originally Posted by Ramy Mahrous View Post
Strange!! Did you debug it?
yeah that was when i noticed the problem.
Due to lack of freedom of speech, i no longer post on this website.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC