Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CFileException?

85 views
Skip to first unread message

Greg Ewing

unread,
Apr 9, 1999, 3:00:00 AM4/9/99
to
I have the following code:

CFileException e;
pFile->Open(FileName, CFile::modeRead | CFile::shareDenyNone, &e);

where the FilePath is "" and the FileName is tlg0392.txt. In debug
mode I find out that it is throwing a CFileException. error = 0 OS
m_IOsError What does this error mean? What can I do to fix it? (the
file exists)

Where would I go to find out what it means? MSDN says that I should
look in my
operating system documentation, I can't find it in the Windows Manual,
where else could I look?
thanks a lot.

Greg
gew...@wharton.upenn.edu


Andy Macdonald

unread,
Apr 9, 1999, 3:00:00 AM4/9/99
to
Greg,

what is the value in e.m_cause after the exception has occurred ?
I have always found these errors to be pretty accurate

Andy


Greg Ewing wrote in message <370E4CB2...@wharton.upenn.edu>...

Jim Marshall

unread,
Apr 11, 1999, 3:00:00 AM4/11/99
to
>>In debug mode I find out that it is throwing a CFileException

have you set a break point on the line in question and stepped into the MFC
code to see exactly where it is failing - this could lead you to some clues
as to what is happing

--
Visit: http://ourworld.compuserve.com/homepages/jjmarshall/


Joku

unread,
Apr 12, 1999, 3:00:00 AM4/12/99
to
This may not be much, but to get the description of the error, just call
ReportError() from your CException derived class.

from your example, call this after your open:

e.ReportError();

--

John Joelle Cruz
Software Engineer
Nortel Networks Inc.
[e-mail] johnc...@usa.net
[homepage] http://members.xoom.com/johncruise

Greg Ewing <gew...@wharton.upenn.edu> wrote in message
news:370E4CB2...@wharton.upenn.edu...

0 new messages