~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSException.h

This will now require someone to do a --plugin-add in order to have csv,
archive, or blackhole running.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2008 PrimeBase Technologies GmbH, Germany
 
1
/* Copyright (c) 2008 PrimeBase Technologies GmbH, Germany
2
2
 *
3
3
 * PrimeBase Media Stream for MySQL
4
4
 *
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
18
 *
19
19
 * Original author: Paul McCullagh (H&G2JCtL)
20
20
 * Continued development: Barry Leslie
30
30
 
31
31
#include <errno.h>
32
32
#include <limits.h>
33
 
#include <stdarg.h>
34
33
 
35
34
#include "CSDefs.h"
36
35
#include "CSString.h"
37
36
#include "CSObject.h"
38
37
 
 
38
using namespace std;
 
39
 
39
40
#define CS_ERR_ASSERTION                                                -14000
40
41
#define CS_ERR_EOF                                                              -14001
41
42
#define CS_ERR_JUMP_OVERFLOW                                    -14002
55
56
#define CS_ERR_CHECKSUM_ERROR                                   -14016
56
57
#define CS_ERR_MISSING_HTTP_HEADER                              -14017
57
58
#define CS_ERR_OPERATION_NOT_SUPPORTED                  -14018
58
 
#define CS_ERR_BODY_INCOMPLETE                                  -14019
59
 
#define CS_ERR_RECEIVE_TIMEOUT                                  -14020
60
59
 
61
60
#define CS_EXC_CONTEXT_SIZE                                             300
62
61
#define CS_EXC_MESSAGE_SIZE                                             (PATH_MAX + 300)
83
82
        void log(CSThread *self);
84
83
        void log(CSThread *self, const char *message);
85
84
 
86
 
        void initException_va(const char *func, const char *file, int line, int err, const char *fmt, va_list ap);
87
85
        void initException(CSException &exception);
88
 
        void initExceptionf(const char *func, const char *file, int line, int err, const char *fmt, ...);
89
86
        void initException(const char *func, const char *file, int line, int err, const char *message);
90
87
        void initAssertion(const char *func, const char *file, int line, const char *message);
91
88
        void getCoreError(uint32_t size, char *buffer, int err);
101
98
 
102
99
        static void throwException(const char *func, const char *file, int line, int err, const char *message, const char *stack);
103
100
        static void throwException(const char *func, const char *file, int line, int err, const char *message);
104
 
        static void throwExceptionf(const char *func, const char *file, int line, int err, const char *fmt, ...);
105
101
        static void throwAssertion(const char *func, const char *file, int line, const char *message);
106
102
        static void throwCoreError(const char *func, const char *file, int line, int err);
107
103
        static void throwCoreError(const char *func, const char *file, int line, int err, const char *item);