Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit 2b570ba

Browse files
committed
Renamed exception class
1 parent 205853b commit 2b570ba

40 files changed

Lines changed: 199 additions & 196 deletions

‎include/cppgit2/apply.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22
#include <cppgit2/diff.hpp>
3-
#include <cppgit2/exception.hpp>
3+
#include <cppgit2/git_exception.hpp>
44
#include <cppgit2/libgit2_api.hpp>
55
#include <cppgit2/ownership.hpp>
66
#include <functional>
@@ -28,7 +28,7 @@ class apply : public libgit2_api {
2828
// Default construct apply::options
2929
options() {
3030
if (git_apply_options_init(&default_options_, GIT_APPLY_OPTIONS_VERSION))
31-
throw exception();
31+
throw git_exception();
3232
c_ptr_ = &default_options_;
3333
}
3434

‎include/cppgit2/attribute.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include <cppgit2/exception.hpp>
2+
#include <cppgit2/git_exception.hpp>
33
#include <git2.h>
44
#include <string>
55

‎include/cppgit2/blob.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include <cppgit2/exception.hpp>
2+
#include <cppgit2/git_exception.hpp>
33
#include <cppgit2/libgit2_api.hpp>
44
#include <cppgit2/oid.hpp>
55

‎include/cppgit2/commit.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22
#include <cppgit2/data_buffer.hpp>
3-
#include <cppgit2/exception.hpp>
3+
#include <cppgit2/git_exception.hpp>
44
#include <cppgit2/libgit2_api.hpp>
55
#include <cppgit2/oid.hpp>
66
#include <cppgit2/ownership.hpp>

‎include/cppgit2/config.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22
#include <cppgit2/data_buffer.hpp>
3-
#include <cppgit2/exception.hpp>
3+
#include <cppgit2/git_exception.hpp>
44
#include <cppgit2/libgit2_api.hpp>
55
#include <cppgit2/ownership.hpp>
66
#include <cppgit2/transaction.hpp>

‎include/cppgit2/data_buffer.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include <cppgit2/exception.hpp>
2+
#include <cppgit2/git_exception.hpp>
33
#include <cppgit2/libgit2_api.hpp>
44
#include <cstdlib>
55
#include <cstring>

‎include/cppgit2/diff.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class diff : public libgit2_api {
116116
git_diff_init_options(&default_options_, GIT_DIFF_OPTIONS_VERSION);
117117
c_ptr_ = &default_options_;
118118
if (ret != 0)
119-
throw exception();
119+
throw git_exception();
120120
}
121121

122122
options(git_diff_options *c_ptr) : c_ptr_(c_ptr) {}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
namespace cppgit2 {
77

8-
class exception : public std::exception {
8+
class git_exception : public std::exception {
99
public:
10-
exception() {
10+
git_exception() {
1111
auto error = git_error_last();
1212
message_ = error ? error->message : "unknown error";
1313
}
14-
exception(const char *message) : message_(message) {}
15-
exception(const std::string &message) : message_(message) {}
16-
virtual ~exception() throw() {}
14+
git_exception(const char *message) : message_(message) {}
15+
git_exception(const std::string &message) : message_(message) {}
16+
virtual ~git_exception() throw() {}
1717
virtual const char *what() const throw() { return message_.c_str(); }
1818

1919
protected:

‎include/cppgit2/libgit2_api.hpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include <cppgit2/exception.hpp>
2+
#include <cppgit2/git_exception.hpp>
33
#include <cppgit2/libgit2_api.hpp>
44
#include <git2.h>
55
#include <iostream>
@@ -16,7 +16,7 @@ class libgit2_api {
1616
std::tuple<int, int, int> version() const {
1717
int major, minor, revision;
1818
if (git_libgit2_version(&major, &minor, &revision))
19-
throw exception();
19+
throw git_exception();
2020
return {major, minor, revision};
2121
}
2222
};

‎include/cppgit2/object.hpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include <cppgit2/exception.hpp>
2+
#include <cppgit2/git_exception.hpp>
33
#include <cppgit2/libgit2_api.hpp>
44
#include <cppgit2/oid.hpp>
55
#include <git2.h>

0 commit comments

Comments
 (0)