1 /****************************************************************************
5 * FreeType API for error code handling.
7 * Copyright (C) 2018-2020 by
8 * Armin Hasitzka, David Turner, Robert Wilhelm, and Werner Lemberg.
10 * This file is part of the FreeType project, and may only be used,
11 * modified, and distributed under the terms of the FreeType project
12 * license, LICENSE.TXT. By continuing to use, modify, or distribute
13 * this file you indicate that you have read the license and
14 * understand and accept it fully.
19 #include <freetype/internal/ftdebug.h>
20 #include <freetype/fterrors.h>
23 /* documentation is in fterrors.h */
25 FT_EXPORT_DEF( const char* )
26 FT_Error_String( FT_Error error_code )
28 if ( error_code < 0 ||
29 error_code >= FT_ERR_CAT( FT_ERR_PREFIX, Max ) )
32 #if defined( FT_CONFIG_OPTION_ERROR_STRINGS ) || \
33 defined( FT_DEBUG_LEVEL_ERROR )
36 #define FT_ERROR_START_LIST switch ( FT_ERROR_BASE( error_code ) ) {
37 #define FT_ERRORDEF( e, v, s ) case v: return s;
38 #define FT_ERROR_END_LIST }
40 #include <freetype/fterrors.h>
42 #endif /* defined( FT_CONFIG_OPTION_ERROR_STRINGS ) || ... */