1
QB64 Discussion / Trapping "File Not Found" Errors
« on: June 25, 2020, 11:53:46 am »
Hey all. Long time QB45 user, and jumping on the QB64 bandwagon like everyone else.
I'm trying to trap the 'file not found' error, and running into an issue upon subsequent error conditions.
then, NotFound:
This routine correct traps the first occurrence, however on second occurrence, the trap does not work and QB64 attempts to open a non-existent file and I get a pop-up error (assuming from the compiler).
I'm sure I'm missing something simple (like clearing the error state), but figured the 'ON ERROR GOTO 0" would handle it properly.
Thanks in advance.
I'm trying to trap the 'file not found' error, and running into an issue upon subsequent error conditions.
Code: QB64: [Select]
then, NotFound:
Code: QB64: [Select]
- NotFound:
- GOTO getfilename
This routine correct traps the first occurrence, however on second occurrence, the trap does not work and QB64 attempts to open a non-existent file and I get a pop-up error (assuming from the compiler).
I'm sure I'm missing something simple (like clearing the error state), but figured the 'ON ERROR GOTO 0" would handle it properly.
Thanks in advance.