rustyd Posted April 23, 2007 Posted April 23, 2007 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. Quote rustyd
Administrators PlausiblyDamp Posted April 24, 2007 Administrators Posted April 24, 2007 Is this a web or windows application? If a web application are the 2 code files placed in the App_Code folder? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
rustyd Posted April 24, 2007 Author Posted April 24, 2007 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. Quote rustyd
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.