As per your request, here is the copy of my code where the program err's out. 
I'm working with Mac 
OSX.  If I step through, it does, indeed, get to the exception handling.  
However, as I stated earlier, it 
comes to a screeching halt at the indicated line, like it is trying to actually 
read from the file.

===========================================
  if file <>nil then  'is the file empty?
    filereadfrom=file.OpenAsTextFile  'open as a text file
    do
      nameholding = filereadfrom.readline <------err's at this point
      passwordholding=filereadfrom.readline
      securitylevelholding = filereadfrom.readline
      if  editUserName.text=nameholding and editPassword.text=passwordholding 
then
        timerLogin.enabled = false 'disable the timer, cuz they've entered a 
valid value
        txtTimeRemaining.Visible=false 'hide the text for the countdown
        txttimerval.Visible=false               'and hide the counder itself...
        'going to have to change the quit to something else
        winTroubleType.show
      end if
    loop until filereadfrom.eof
======================================================

I've tried it with file.exists and file <>nil and it still err's. (I have the 
exception err msgbox at the end 
of the program, where i was told it should be.

Regards.

> 
> From: "Maarten de Vries" <[EMAIL PROTECTED]>
> Date: 2006/06/25 Sun AM 01:25:43 EST
> To: "REALbasic NUG" <[email protected]>
> Subject: Re: exception error
> 
> It shouldn't. This sounds really weird. Could you show the entire code?
> 
> btw, there is one possibility. if you do somtithing like this "if
> file.exists and file<>NIL then". Now, it will first check if file exists,
> but file is NIL so you cant check it. You can solve this by reversing the
> order: "if file<>nil and file.exists then". If this is not what you're
> doing, please show us the source.
> 
> Maarten
> 
> On 25/06/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Hi there.
> >
> > I'm trying to deal with an exception error, and, as per what I read, I
> > have the exception error at the end
> > of my sub routine. (I'm looking for a file with authorized users.)
> >
> > When I run the program, I do a file<>nil check first, but it falls into
> > the if statement, and trys to read.
> > Should it not fail on the file<>nil then go to the exception?
> >
> > Sincerely,
> >
> > Michael
> >
> > _______________________________________________
> > Unsubscribe or switch delivery mode:
> > <http://www.realsoftware.com/support/listmanager/>
> >
> > Search the archives of this list here:
> > <http://support.realsoftware.com/listarchives/lists.html>
> >
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> 
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
> 

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to