Search the Community
Showing results for tags 'Error Codes'.
Found 1 result
Hi, does anyone know if it is possible to get the same Error Code that the Command Mode issues for an I/O error, but from within an Extended Basic program? There seems to be two error codes returned for the same thing, depending on whether you are in Command Mode or Run Mode. For example: DELETE "XXXX.XXXX" if you execute the above in Run Mode, CALL ERR() returns: error = 130, file = 0, and whichever line number that the statement occurred in. However, if you execute the same command in Command Mode, you get a potentially more useful code of 70. 7 = error in DELETE routine, 0 = BAD DEVICE NAME. Is there some method of retrieving this code, for example is there a reliable location I can peek? I'm happy to use PEEKV, but I want to avoid an Assembly routine if possible as I want this to be Assembly free. I am trying to write some decent error handling where the messages are clear and helpful and any unhandled errors will allow a data save, so that no data is lost. Finding out if a Save failed due to the disk just being write protected would be more helpful than just displaying "I/O ERROR, GUV'NOR". Failing that, I will have to use precious RAM to set up some variables to define context, but it still doesn't help with the Write Protection issue. :-/ Andy.