In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

QTIPS - Standardising Error Message Display

Developers 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)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel