viewpoint-particle

Author Topic: Is it possible to handle 1 particular error code number?  (Read 434 times)

mjwillyone

  • Jr. Member
  • **
  • Posts: 53
Is it possible to handle 1 particular error code number?
« on: November 10, 2021, 09:08:51 am »
Hello all!  I have 1 error code which comes up at times after I run a long Winbatch routine.  The error code is #1590.  Is there a way to handle what I wish to happen after this 1 particular error comes up?  When it happens, it is always at the very end of the script.  I simply wish to close the script and be done.

JTaylor

  • Pundit
  • *****
  • Posts: 1857
    • Data & Stuff Inc.
Re: Is it possible to handle 1 particular error code number?
« Reply #1 on: November 10, 2021, 10:31:04 am »
IntControl 73.

Jim

td

  • Tech Support
  • *****
  • Posts: 4208
    • WinBatch
Re: Is it possible to handle 1 particular error code number?
« Reply #2 on: November 10, 2021, 01:20:46 pm »
Hello all!  I have 1 error code which comes up at times after I run a long Winbatch routine.  The error code is #1590.  Is there a way to handle what I wish to happen after this 1 particular error comes up?  When it happens, it is always at the very end of the script.  I simply wish to close the script and be done.

The error text for the error is "FileDelete: File could not be deleted" so the function causing the problem is fairly certain. It would be better to change the script to handle the situation that caused the error. You can use the FileExist or the FileLockItemize function to check if the file is locked by another process and, therefore, not removable.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

mjwillyone

  • Jr. Member
  • **
  • Posts: 53
Re: Is it possible to handle 1 particular error code number?
« Reply #3 on: November 11, 2021, 01:56:37 am »
Thanks both of you!  I will work on this and get it fixed!