Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi,

 

In VB.NET 1.1, I created 2 classes in separate files. One is a data class and the other is an ExceptionClass. I used the Namespace directive in the following manner:

Namespace RDDC.Components

 

The data class is called DataAccess and the exception class is called ExceptionLogging.

 

I've now added these two files to my VB.NET 2.0 project and in the DataAccess class, when I catch an exception, I throw the exception as follows:

 

     Catch ExceptionObject As Exception
       'Any exception will be logged through our private logexception function
       Dim logerr As New RDDC.Components.ExceptionLogging
       logerr.LogException(ExceptionObject)
       'If an exception occurs, close the connection now!
       _Connection.Close()
       'The exception is passed back to the calling code, with our custom message and specific exception information
       Throw New Exception(logerr.ExecptionMessage, ExceptionObject)

 

The problem is everywhere I'm referencing the RDDC.Components.ExceptionLogging it is giving me an error saying "Type 'RDDC.Components.ExceptionLogging' is undefined"

 

Any help would be appreciated.

rustyd
Posted
Thanks for the reply. It is a web app, and the code was in their own folder, which I moved to the app_code folder and it worked as expected. Thanks PlausiblyDamp.
rustyd

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...