Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

error.c

00001 /*****************************************************************************
00002  * error.c: error handling routine
00003  *****************************************************************************
00004  * Copyright (C) 2002-2004 the VideoLAN team
00005  * $Id: error.c 11664 2005-07-09 06:17:09Z courmisch $
00006  *
00007  * Authors: Samuel Hocevar <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 /*****************************************************************************
00025  * Preamble
00026  *****************************************************************************/
00027 #include <vlc/vlc.h>
00028 
00029 /*****************************************************************************
00030  * vlc_error: strerror() equivalent
00031  *****************************************************************************
00032  * This function returns a string describing the error code passed in the
00033  * argument. A list of all errors can be found in include/vlc/vlc.h.
00034  *****************************************************************************/
00035 char const * vlc_error ( int i_err )
00036 {
00037     switch( i_err )
00038     {
00039         case VLC_SUCCESS:
00040             return "no error";
00041 
00042         case VLC_ENOMEM:
00043             return "not enough memory";
00044         case VLC_ETHREAD:
00045             return "thread error";
00046         case VLC_ETIMEOUT:
00047             return "timeout";
00048 
00049         case VLC_ENOMOD:
00050             return "module not found";
00051 
00052         case VLC_ENOOBJ:
00053             return "object not found";
00054         case VLC_EBADOBJ:
00055             return "bad object type";
00056 
00057         case VLC_ENOVAR:
00058             return "variable not found";
00059         case VLC_EBADVAR:
00060             return "bad variable value";
00061 
00062         case VLC_EEXIT:
00063             return "program exited";
00064         case VLC_EGENERIC:
00065             return "generic error";
00066         default:
00067             return "unknown error";
00068     }
00069 }
00070 

Generated on Tue Dec 20 10:15:00 2005 for vlc-0.8.4a by  doxygen 1.4.2