You are visitor number since February 2004.
Go to Howard Kaikow's home page
Copyright © 2004 by Howard Kaikow. All rights
Date: 22 February 2004
From: Howard Kaikow <email@example.com>
Subject: Try/Catch does not detect out of stack space error
On 14 February 2004, I posted the topic "Error handling doesn't work when I ugrade to VB .NET 2003" in the microsoft.public.dotnet.languages.vb.upgrade newsgroup.
As a result of that discussion, I have created a simplified example to demonstrate the problem in both VB.NET 2002 and VB.NET 2003.
I created the VB .NET 2003 project from a new project in VB .NET 2003.
I created the VB .NET 2002 project from the VB .NET 2003 project using the instructions in http://www.codeproject.com/KB/macros/vsconvert.aspx.
I have identified several code blocks using comments. To understand the rest of this document, you will need to download and view the code.
Running the code with VB .NET 2003, I find the following:
' Neither the Try/Catch in btnStart_Click, or in TestRecursion, will detect a stack overflow ' error if ANY of the code blocks identified as L or Bn are uncommented, where "n" is a number ' from 1 to the number of code blocks identified as failing that use Rnd or Random. ' If code block L is not uncommented, then Try/Catch will detect a stack overflow error if any ' of the code blocks identified as Gm are uncommented, where "m" is a number from 1 to the ' number of code blocks identified as OK that use Random.
Running the code with VB .NET 2002, I get the same results with the following two differences:
Download VB .NET 2002 project.
Download VB .NET 2003 project.