logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

m17nError_-_Error_Hand - - Error handling of the m17n library.

Author

       Generated automatically by Doxygen for The m17n Library from the source code.

Detailed Description

       Error handling of the m17n library.

       There are two types of errors that may happen in a function of the m17n library.

       The first type is argument errors. When a library function is called with invalid arguments, it returns a
       value that indicates error and at the same time sets the external variable merror_code to a non-zero
       integer.

       The second type is memory allocation errors. When the required amount of memory is not available on the
       system, m17n library functions call a function pointed to by the external variable
       m17n_memory_full_handler. The default value of the variable is a pointer to the default_error_handle()
       function, which just calls  exit().

Enumeration Type Documentation

enumMErrorCode
       Enumeration for error code of the m17n library. Enumeration for error code of the m17n library.

       When a library function is called with an invalid argument, it sets the external variable merror_code to
       one of these values. All the error codes are positive integers.

       When a memory allocation error happens, the function pointed to by the external variable
       m17n_memory_full_handler is called with one of these values as an argument.

       EnumeratorMERROR_NONEMERROR_OBJECTMERROR_SYMBOLMERROR_MTEXTMERROR_TEXTPROPMERROR_CHARMERROR_CHARTABLEMERROR_CHARSETMERROR_CODINGMERROR_RANGEMERROR_LANGUAGEMERROR_LOCALEMERROR_PLISTMERROR_MISCMERROR_WINMERROR_XMERROR_FRAMEMERROR_FACEMERROR_DRAWMERROR_FLTMERROR_FONTMERROR_FONTSETMERROR_FONT_OTFMERROR_FONT_XMERROR_FONT_FTMERROR_IMMERROR_DBMERROR_IOMERROR_DEBUGMERROR_MEMORYMERROR_GDMERROR_MAX

Name

       m17nError_-_Error_Hand -  - Error handling of the m17n library.

Synopsis

Enumerations
       enum MErrorCode { MERROR_NONE, MERROR_OBJECT, MERROR_SYMBOL, MERROR_MTEXT, MERROR_TEXTPROP, MERROR_CHAR,
           MERROR_CHARTABLE, MERROR_CHARSET, MERROR_CODING, MERROR_RANGE, MERROR_LANGUAGE, MERROR_LOCALE,
           MERROR_PLIST, MERROR_MISC, MERROR_WIN, MERROR_X, MERROR_FRAME, MERROR_FACE, MERROR_DRAW, MERROR_FLT,
           MERROR_FONT, MERROR_FONTSET, MERROR_FONT_OTF, MERROR_FONT_X, MERROR_FONT_FT, MERROR_IM, MERROR_DB,
           MERROR_IO, MERROR_DEBUG, MERROR_MEMORY, MERROR_GD, MERROR_MAX }
           Enumeration for error code of the m17n library.

   Variables
       int merror_code
           External variable to hold error code of the m17n library.
       void(* m17n_memory_full_handler )(enum MErrorCode err)
           Memory allocation error handler.

Variable Documentation

intmerror_code
       External  variable  to  hold  error  code of the m17n library. The external variable merror_code holds an
       error code of the m17n library. When a library function is called with an invalid argument, it sets  this
       variable to one of enum MErrorCode.

       This variable initially has the value 0.

   void(*m17n_memory_full_handler)(enumMErrorCodeerr)(enumMErrorCodeerr)
       Memory  allocation  error  handler. The external variable m17n_memory_full_handler holds a pointer to the
       function to call when a library function failed to  allocate  memory.  err  is  one  of  enum  MErrorCode
       indicating in which function the error occurred.

       This variable initially points a function that simply calls the exit () function with err as an argument.

       An  application  program that needs a different error handling can change this variable to point a proper
       function.

See Also