Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A lighter "File not Found" routine
#3
Quote:Is there any way in FB/QB to test for the existence of a file, and have the program simply "move on" if it doesn't exist? That way the whole program doesn't crash from trying to interact with what doesn't exist.
Simply "moving on" does not make any sense. What if the only input file to the program does not exist? Got no input, so "move on" to what?

The only thing you can do is detect the error, print an error message and terminate the program. That's not exactly "crashing" the program. Crashing it would happen if you don't detect the error, which would send an error number to the screen and abort the program.
*****
Reply


Messages In This Thread
A lighter "File not Found" routine - by Rokkuman - 08-22-2005, 01:55 AM
Re: A lighter "File not Found" routine - by Moneo - 08-22-2005, 07:04 AM
A lighter "File not Found" routine - by Neo - 08-22-2005, 04:04 PM
A lighter "File not Found" routine - by mjs - 08-23-2005, 02:07 AM
A lighter "File not Found" routine - by Moneo - 08-23-2005, 05:11 AM
A lighter "File not Found" routine - by Z!re - 08-23-2005, 05:32 AM
A lighter "File not Found" routine - by Agamemnus - 08-23-2005, 09:45 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)