TLIB documentation
 

tlError.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////////
00002 //
00003 //  This file is part of the TLIB computer vision library.
00004 //  Copyright (C) 2003-2008 Sebastien Grange
00005 //  Copyright (C) 2003-2007 VRAI Group, EPFL
00006 //  All rights reserved.
00007 // 
00008 //  This library is free software; you can redistribute it and/or modify
00009 //  it under the terms of the GNU General Public License("GPL") version 2
00010 //  as published by the Free Software Foundation.
00011 // 
00012 //  <http://www.tuyphon.com/tlib>
00013 //
00014 /////////////////////////////////////////////////////////////////////////////////
00015 
00016 
00017 #ifndef __TLERROR_H__
00018 #define __TLERROR_H__
00019 
00020 #include "tlVision.h"
00021 
00022 
00023 // error codes
00024 enum tl_errors { 
00025   TL_NO_ERROR, 
00026   TL_ERROR, 
00027   TL_ERROR_INVALID_FORMAT,
00028   TL_ERROR_GEOMETRY, 
00029   TL_ERROR_NULL_POINTER,
00030   TL_ERROR_INDEX_OUT_OF_BOUNDS,
00031   TL_ERROR_MAX_REACHED,
00032   TL_ERROR_ALLOCATION_FAILED,
00033   TL_ERROR_NOT_IMPLEMENTED, 
00034   TL_ERROR_FILE_IO, 
00035   TL_ERROR_FILE_NOT_FOUND_OR_CORRUPT, 
00036   TL_ERROR_NOT_REQUIRED,
00037   TL_ERROR_NOT_FOUND, 
00038   TL_ERROR_NOT_AVAILABLE, 
00039   TL_ERROR_NOT_IN_IMAGE,
00040   TL_ERROR_STACK_OVERFLOW, 
00041   TL_ERROR_TIMEOUT,
00042   TL_ERROR_THREAD,
00043   TL_ERROR_TIMER,
00044   TL_ERROR_RESOURCE_NOT_AVAILABLE,
00045   TL_ERROR_CONFIG_FAILED,
00046   TL_ERROR_GRAB_FAILED,
00047   TL_ERROR_HIGHRES_INCOMPATIBLE,
00048   TL_ERROR_NA
00049 };
00050 
00051 #define tl_errno (*tl_errno_location())
00052 #define TL_ERROR_MSG(msg)       { if (tlVerbose) { cout << msg << endl;} }
00053 #define TL_ERRNO_MSG(msg,errno) { (tl_errno = errno); if (tlVerbose > 0) {tlError (msg); }}
00054 
00055 // tl_errno thread-safe global
00056 int *tl_errno_location ();
00057 void tl_errno_destructor (void *);
00058 void tl_errno_once ();
00059 
00060 // error processing
00061 void tlError ();
00062 void tlError (const char *str);
00063 void tlError (int errno);
00064 void tlError (int errno, const char *str);
00065 char *tlErrorGetString (int errno);
00066 char *tlErrorGetString (int errno);
00067 
00068 #endif


TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.