-
Notifications
You must be signed in to change notification settings - Fork 699
Expand file tree
/
Copy patherror.h
More file actions
executable file
·62 lines (52 loc) · 1.18 KB
/
error.h
File metadata and controls
executable file
·62 lines (52 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* Copyright 2011, Tim Branyen @tbranyen <[email protected]>
* Dual licensed under the MIT and GPL licenses.
*/
#ifndef ERROR_H
#define ERROR_H
#include <node.h>
#include "../vendor/libgit2/include/git2.h"
using namespace v8;
using namespace node;
/**
* Class: GitError
* Wrapper for libgit2 git_error.
*/
class GitError : public ObjectWrap {
public:
/**
* Variable: constructor_template
* Used to create Node.js constructor.
*/
static Persistent<Function> constructor_template;
/**
* Function: Initialize
* Used to intialize the EventEmitter from Node.js
*
* Parameters:
* target - Object the Node.js global module object
*/
static void Initialize(Handle<Object> target);
static Local<Object> WrapError(const git_error* error);
protected:
const git_error* error;
/**
* Constructor: GitError
*/
GitError() {};
/**
* Deconstructor: GitError
*/
~GitError() {};
/**
* Function: New
*
* Parameters:
* args Arguments function call
*
* Returns:
* Object args.This()
*/
static Handle<Value> New(const Arguments& args);
};
#endif