Function 59h (89)        Get Extended Error Information             ò DOS 3.0
 
    Returns diagnostic information following an unsuccessful DOS function
    call or Interrupt 24h.
 
       On entry:      AH         59h
                      BX         0000h for DOS 3.0 and above
 
       Returns:       AX         Extended error code
                      BH         Error class
                      BL         Suggested action
                      CH         Locus (Source of error)
 
       Destroys:      CL, DX, SI, DI, ES, and DS are all changed
 
  --------------------------------------------------------------------------
 
    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.
 
    Values returned in AX (extended error code):
 
        AX    Extended error code              AX    Extended error code
        01h   Invalid function number          14h   Unknown unit
        02h   File not found                   15h   Drive not ready
        03h   Path not found                   16h   Unknown command
        04h   Too many open files              17h   Data error (CRC)
        05h   Access denied                    18h   Bad request structure
        06h   Invalid handle                         length
        07h   Memory control blocks            19h   Seek error
              destroyed                        1Ah   Unknown medium type
        08h   Insufficient memory              1Bh   Sector not found
        09h   Invalid memory block address     1Ch   Printer out of paper
        0Ah   Invalid environment              1Dh   Write fault
        0Bh   Invalid format                   1Eh   Read fault
        0Ch   Invalid access code              1Fh   General failure
        0Dh   Invalid data                     20h   Sharing violation
        0Fh   Invalid disk drive               21h   Lock violation
        10h   Attempt to remove current        22h   Invalid disk change
              directory                        23h   FCB unavailable
        11h   Not the same device              50h   File already exists
        12h   No more files                    52h   Cannot make directory
        13h   Disk is write-protected          53h   Critical error
 
    Values returned in BH (error class):
 
           BX    Error class
           01h   Out of resource
           02h   Temporary problem that can be expected to go away
           03h   Authorization (permission) problem
           04h   Internal error (i.e., a system software bug)
           05h   Hardware problem (not the fault of your program)
           06h   System software failure (e.g. bad or missing CONFIG.SYS)
           07h   Application program error
           08h   File or other item not found
           09h   File or other item of invalid or unsuitable format or type
           0Ah   File or other item interlocked
           0Bh   Media problem (e.g. CRC error, wrong disk in drive)
           0Ch   Collision with existing item
           0Dh   Other (unclassified)
 
    Values returned in BL (suggested action):
 
           BL    Suggested action
           01h   Retry a few times
           02h   Pause, then retry
           03h   Ask user to resupply input
           04h   Abort with cleanup (orderly shutdown)
           05h   Immediate abort (do not pass GO)
           06h   Ignore
           07h   Ask user for remedial action (e.g. insertion of
                 diskette), then retry
 
    Values returned in CH (source of error):
 
           CH    Source of error
           01h   Unknown
           02h   Block device (disk)
           03h   Network
           04h   Serial device
           05h   Memory
 
       Notes:         Since new error codes may be added from time to
                      time, your program should be able to gracefully
                      handle unrecognized error codes.

Seealso:



This page last updated on Fri Nov 30 10:49:50 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster