~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-10-20 20:26:18 UTC
  • mfrom: (1859.2.13 refactor)
  • Revision ID: brian@tangent.org-20101020202618-9222n39lm329urv5
Merge for Brian 

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
 *
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);