home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxerror.zip / RxError.txt < prev    next >
Text File  |  1999-09-01  |  2KB  |  52 lines

  1. This REXX extension DLL allows one to toggle the hard error state of OS/2.
  2.  
  3. By disabling hard errors, one can avoid interruptions by OS/2 when a 
  4. hardware device is in a not ready state, and other hard error pop-ups.
  5.  
  6. For example, if you attempt to change to the root directory of a CD drive 
  7. that has a music CD in it, or no CD at all, OS/2 normally pops up a box 
  8. saying that the drive isn't ready, and offers you a chance to retry, return 
  9. an error code, or end the current program.  This can be annoying, and it 
  10. can also be fatal for automated tasks.
  11.  
  12. With hard errors disabled, this pop-up will not occur, and the directory() 
  13. function will merely return a null string, indicating failure.  The same is 
  14. true with invalid drives.
  15.  
  16. To use this function, copy RxError.dll to a directory in your libpath, and 
  17. put the following line in your REXX program before calling the RxError 
  18. function:
  19.  
  20. call RxFuncAdd 'RxError','RxError','RxError'
  21.  
  22. You may then call RxError with a single argument, which must be one of the 
  23. following (case insensitive):
  24.  
  25. disableharderrors \
  26. disableharderr      \
  27. disablehard           \  Disable hard errors.
  28. dhard                 /
  29. dh                  /
  30. 0                 /
  31.  
  32. enableharderrors \
  33. enableharderr      \
  34. enablehard           \  Enable hard errors.
  35. ehard                /
  36. eh                 /
  37. 1                /
  38.  
  39.  
  40. If you provide an invalid parameter, a syntax error will be triggered.  The 
  41. only return value is 0, since there is no possible failure once the syntax 
  42. is correct.
  43.  
  44. See example.cmd for a demonstration.
  45.  
  46. The program works by simply calling the DosError() API with the appropriate 
  47. parameter.  While disabling hard errors implicitly enables exception 
  48. pop-ups, RxError is not intended to toggle exception states, since REXX has 
  49. no facility to register and exception handler.
  50.  
  51. The source and module definition file are in the source.zip archive.
  52.