#include <mach/mig_errors.h> also included by <mach/mach.h>

mach/mig_errors.h

10 macros · 1 struct · 1 typedef · 1 function

macroMIG_TYPE_ERROR

#define MIG_TYPE_ERROR -300
client type check failure

macroMIG_REPLY_MISMATCH

#define MIG_REPLY_MISMATCH -301
wrong reply message ID

macroMIG_REMOTE_ERROR

#define MIG_REMOTE_ERROR -302
server detected error

macroMIG_BAD_ID

#define MIG_BAD_ID -303
bad request message ID

macroMIG_BAD_ARGUMENTS

#define MIG_BAD_ARGUMENTS -304
server type check failure

macroMIG_NO_REPLY

#define MIG_NO_REPLY -305
no reply should be send

macroMIG_EXCEPTION

#define MIG_EXCEPTION -306
server raised exception

macroMIG_ARRAY_TOO_LARGE

#define MIG_ARRAY_TOO_LARGE -307
array not large enough

macroMIG_SERVER_DIED

#define MIG_SERVER_DIED -308
server died

macroMIG_TRAILER_ERROR

#define MIG_TRAILER_ERROR -309
trailer has an unknown format

structmig_reply_error_t

Whenever MIG detects an error, it sends back a generic mig_reply_error_t format message. Clients must accept these in addition to the expected reply message format.
size 36, align 4
mach_msg_header_tHead
NDR_record_tNDR
kern_return_tRetCode

typedefmig_reply_error_t

typedef struct mig_reply_error_t mig_reply_error_t;

function__NDR_convert__mig_reply_error_t

static __inline__ void __NDR_convert__mig_reply_error_t(__unused mig_reply_error_t *x)
claude-fable-5, 2026-08-24 · not from Apple sources · verified against xnu osfmk/mach/mig_errors.h
Inline NDR conversion helper for mig_reply_error_t, used by MIG-generated code. If an integer-representation converter for kern_return_t is defined and the reply's NDR record indicates a different integer representation than the local NDR_record, converts the RetCode field; on Apple platforms, where no such converter is defined, it compiles to a no-op.