Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- DOS 5.0 Ref. - <b>function 59h get extended error dos 3.0+</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 59h            Get Extended Error                           DOS 3.0+

    Returns extended-error information, including the location where
    an error occurred and a suggested action, for the most recent DOS
    interrupt 21h function call.

        Entry   AH = 59h
                BX = 0000h

        Return  Expect all registers except CS:IP and SS:SP
                to be changed
                AX = Extended error code
                BH = Error class
                BL = Suggested action
                CH = Error locus (source of error)

    ------------------------------------------------------------------

    This function returns detailed diagnostic information about an
    error condition. It can be used from inside a critical-error
    (interrupt 24h) handler; after a DOS function call that reports an
    error by setting the carry flag; and after an FCB file operation
    that reports a return code of FFh.

    Most functions supported by DOS 2.0+ report an error by setting
    the carry flag and placing an error code in the AX register.


    Note
    Functions available under DOS 2.x map the true DOS 3.0+ error code
    into one supported under DOS 2.x (00-12h). A program should call
    this function to retrieve the true error code when a DOS 2.x (or
    FCB) function returns an error.


    Extended-error code (AX)
    See list of "Error codes"


    Error class (BH)
    ERRCLASS_OUTRES  = 01h  ; Out of resource (such as storage)
    ERRCLASS_TEMPSIT = 02h  ; Temporary situation (file or record lock)
    ERRCLASS_AUTH    = 03h  ; Authorization problem (denied access)
    ERRCLASS_INTRN   = 04h  ; Internal (system software bug)
    ERRCLASS_HRDFAIL = 05h  ; Hardware failure
    ERRCLASS_SYSFAIL = 06h  ; System failure (bad/no configuration file)
    ERRCLASS_APPERR  = 07h  ; Application program error
    ERRCLASS_NOTFND  = 08h  ; File or item not found
    ERRCLASS_BADFMT  = 09h  ; File or item has invalid format or type
    ERRCLASS_LOCKED  = 0Ah  ; Interlocked file or item
    ERRCLASS_MEDIA   = 0Bh  ; Storage-medium error
    ERRCLASS_ALREADY = 0Ch  ; File or item exists already
    ERRCLASS_UNK     = 0Dh  ; Unknown (unclassified)


    Suggested action (BL)
    ERRACT_RETRY     = 01h  ; Retry immediately
    ERRACT_DLYRET    = 02h  ; Delay and retry
    ERRACT_USER      = 03h  ; Prompt user to reenter input
    ERRACT_ABORT     = 04h  ; Terminate in an orderly manner
    ERRACT_PANIC     = 05h  ; Terminate immediately
    ERRACT_IGNORE    = 06h  ; Ignore the error
    ERRACT_INTRET    = 07h  ; Retry after user intervention


    Error locus (CH)
    ERRLOC_UNK       = 01h  ; Unknown (or not appropriate)
    ERRLOC_DISK      = 02h  ; Block device (disk)
    ERRLOC_NET       = 03h  ; Network
    ERRLOC_SERDEV    = 04h  ; Serial device (timeout)
    ERRLOC_MEM       = 05h  ; Memory

See Also: 5d0ah Int 24h Error codes

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson