## exc_server

Function - Handle kernel-reported thread exception.

### SYNOPSIS

    boolean_t	exc_server
    		(mach_msg_header_t	request_msg,
    		mach_msg_header_t	reply_ms);

### PARAMETERS

in_msg
  [pointer to in structure] The exception message received from the kernel.

out_msg
  [out structure] A reply message.

### DESCRIPTION

The exc_server function is the MIG generated server handling function to handle messages from the kernel relating to the occurrence of an exception in a thread. Such messages are delivered to the exception port set via thread_set_exception_ports or task_set_exception_ports. When an exception occurs in a thread, the thread sends an exception message to its exception port, blocking in the kernel waiting for the receipt of a reply. The exc_server function performs all necessary argument handling for this kernel message and calls catch_exception_raise, catch_exception_raise_state or catch_exception_raise_state_identity, which should handle the exception. If the called routine returns KERN_SUCCESS, a reply message will be sent, allowing the thread to continue from the point of the exception; otherwise, no reply message is sent and the called routine must have dealt with the exception thread directly.

### RETURN VALUES

TRUE
  The message was handled and the appropriate function was called.

FALSE
  The message did not apply to the exception mechanism and no other action was taken.

### RELATED INFORMATION

Functions: catch_exception_raise.