-
Using MFC Exceptions in Console Applications
I have a test program that uses the CFile class. When it fails to open a file
(ie. when I have locked the file), it returns false. The error information
is given to me in a CFileException object. When I try to format the message
for this exception, an assertion is thrown because my program does not have
a resource handle.
I am assuming it is because I am using a console application, but how can
I use the MFC exception frameowrk from my console application.
Greg
-
Re: Using MFC Exceptions in Console Applications
why would you want to use MFC in a console app in the first place? I
suggest that you use fstream objects instead and standard exception
handling.
Danny
Greg wrote:
>
> I have a test program that uses the CFile class. When it fails to open a file
> (ie. when I have locked the file), it returns false. The error information
> is given to me in a CFileException object. When I try to format the message
> for this exception, an assertion is thrown because my program does not have
> a resource handle.
>
> I am assuming it is because I am using a console application, but how can
> I use the MFC exception frameowrk from my console application.
>
> Greg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks