Skip to content

Commit 1902304

Browse files
changed name of customexcpetion
1 parent baf7471 commit 1902304

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

include/gitRepo.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class GitRepo {
1919
gitdir = fs::path(worktree) / DOTGIT;
2020

2121
if (!(force || (fs::exists(gitdir) && fs::is_directory(gitdir)))) {
22-
throw Exception("Not a Git repository" + worktree);
22+
throw GitException("Not a Git repository" + worktree);
2323
}
2424
}
2525

include/gitexceptions.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
#include <iostream>
55
#include <string>
66

7-
class Exception : public std::exception {
7+
class GitException : public std::exception {
88
private:
99
std::string message;
1010

1111
public:
1212
// Constructor accepts a const char* that is used to set
1313
// the exception message
14-
Exception(const std::string& msg) : message(msg) {}
14+
GitException(const std::string& msg) : message(msg) {}
1515

1616
// Override the what() method to return our message
1717
const char* what() const throw();

include/utils.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,4 @@ class Utils {
1111
// TODO : repo_file, repo_dir
1212
};
1313

14-
Utils::Utils(/* args */) {}
15-
16-
Utils::~Utils() {}
17-
1814
#endif

src/gitexceptions.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
#include <../include/gitexceptions.hpp>
22

3-
Exception::Exception(const std::string& msg) : message(msg) {}
4-
53
// Override the what() method to return our message
6-
const char* Exception::what() const throw() { return message.c_str(); }
4+
const char* GitException::what() const throw() { return message.c_str(); }

0 commit comments

Comments
 (0)