|
|||||||
QTIPS - Standardising Error Message DisplayDevelopers keen to apply consistent standards when creating applications have been aided by the introduction of FSMSG which can be used for reporting on all BFS file i/o problems. Unfortunately it does not help when errors are encountered using standard OS functions such as OSBREAD and OSBWRITE which return error status in the STATUS() variable. An undocumented routine called OSERROR can be used to convert the STATUS() value into a meaningful @FILE.ERROR message suitable for use with FSMSG. The routine takes four parameters as follows 0001 Call OSERROR ( Unknown , Environment , File, Status ) where Unknown seems not to be used, Environment contains a literal to include in error messages indicating the environment originating the error (E.G. DOS/ MSDOS), File contains the filename to include in the error message and Status contains the error status generated by the i/o action. Sample usage follows 0001 Osbread Chunk From Os_File At X Length 60000 0002 If Status() Then 0003 Status = Status() 0004 Call Oserror("", "DOS", File, Status) 0005 Call Fsmsg() 0006 End (Volume 3, Issue 8, Page 9) |
|||||||
| |||||||