]> git.saurik.com Git - cycript.git/blob - Error.hpp
Completed massive refactoring operation to completely isolate Objective-C.
[cycript.git] / Error.hpp
1 #ifndef CYCRIPT_ERROR_HPP
2 #define CYCRIPT_ERROR_HPP
3
4 #include "Pooling.hpp"
5 #include "Exception.hpp"
6
7 struct CYJSError :
8 CYException
9 {
10 JSContextRef context_;
11 JSValueRef value_;
12
13 CYJSError(JSContextRef context, JSValueRef value) :
14 context_(context),
15 value_(value)
16 {
17 }
18
19 CYJSError(JSContextRef context, const char *format, ...);
20
21 virtual const char *PoolCString(apr_pool_t *pool) const;
22 virtual JSValueRef CastJSValue(JSContextRef context) const;
23 };
24
25 struct CYPoolError :
26 CYException
27 {
28 CYPool pool_;
29 const char *message_;
30
31 CYPoolError(const char *format, ...);
32 CYPoolError(const char *format, va_list args);
33
34 virtual const char *PoolCString(apr_pool_t *pool) const;
35 virtual JSValueRef CastJSValue(JSContextRef context) const;
36 };
37
38 #endif/*CYCRIPT_ERROR_HPP*/