Home All Groups Group Topic Archive Search About

not all paths return a value

Author
3 Jan 2006 4:30 PM
guy
i have inherited the following migrated vb6 code (vb2005)
but i DONT get the "not all paths return a value" squiggly - is this a
'feature' of on error goto?

    Private Function CreateFolder(ByVal sFileName As String) As Boolean

        On Error GoTo Errors

        'Create it if necessary
        If Directory.Exists(sFileName) = False Then
            Directory.CreateDirectory(sFileName)
        End If

        'Succeeded in creating a folder
        CreateFolder = True

Errors:

    End Function

Author
4 Jan 2006 10:22 PM
Herfried K. Wagner [MVP]
"guy" <g**@discussions.microsoft.com> schrieb:
>i have inherited the following migrated vb6 code (vb2005)
> but i DONT get the "not all paths return a value" squiggly - is this a
> 'feature' of on error goto?

Bug report:

<URL:http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?FeedbackId=e053a0fc-7d22-4c60-b596-a7b798a48100>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
5 Jan 2006 8:45 AM
guy
thanks Herfried

Show quoteHide quote
"Herfried K. Wagner [MVP]" wrote:

> "guy" <g**@discussions.microsoft.com> schrieb:
> >i have inherited the following migrated vb6 code (vb2005)
> > but i DONT get the "not all paths return a value" squiggly - is this a
> > 'feature' of on error goto?
>
> Bug report:
>
> <URL:http://lab.msdn.microsoft.com/ProductFeedback/viewFeedback.aspx?FeedbackId=e053a0fc-7d22-4c60-b596-a7b798a48100>
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>
>