Particular 'Import' kills Catch/Try?

jsurpless

Well-known member
Joined
Jul 29, 2008
Messages
144
Programming Experience
Beginner
Hi all

I've got a Class Module that I'm using Catch/Try exception handling in... I just noticed that it seems to stop working if I add the following Import

'Imports Autodesk.AutoCAD.RunTime

Express reacts as if I don't have Catch/Try statements... if there's a sub 'above' the error with handling, that sub catches the error... and if there isn't, it reacts as if there is no handling...

Does this make any sense?
 
Sure... here's some code...

VB.NET:
    Public Function Initialize() As Boolean

        Try

            'If (strAutoCADFilePaths IsNot Nothing) Then

            strAutoCADFilePaths.Initialize()

            'End If

        Catch Exception_Type As Exception

            Calling_Procedure = "Initialize"
            Error_MessageStr = "Class AutoCAD Initialization FAILED"

            If (Err.Number = Error_UnExpected_End_Code) Then Err.Raise(Error_UnExpected_End_Code)

            Call Form_ErrorHandler(Err.Number, Err.Description, Calling_Procedure, Error_MessageStr, Erl)

        End Try

    End Function

This will error on the .Initialize when the array is set to Nothing...
 
Back
Top