File tree Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class GitRepo {
19
19
gitdir = fs::path (worktree) / DOTGIT;
20
20
21
21
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);
23
23
}
24
24
}
25
25
Original file line number Diff line number Diff line change 4
4
#include < iostream>
5
5
#include < string>
6
6
7
- class Exception : public std ::exception {
7
+ class GitException : public std ::exception {
8
8
private:
9
9
std::string message;
10
10
11
11
public:
12
12
// Constructor accepts a const char* that is used to set
13
13
// the exception message
14
- Exception (const std::string& msg) : message(msg) {}
14
+ GitException (const std::string& msg) : message(msg) {}
15
15
16
16
// Override the what() method to return our message
17
17
const char * what () const throw();
Original file line number Diff line number Diff line change @@ -11,8 +11,4 @@ class Utils {
11
11
// TODO : repo_file, repo_dir
12
12
};
13
13
14
- Utils::Utils (/* args */ ) {}
15
-
16
- Utils::~Utils () {}
17
-
18
14
#endif
Original file line number Diff line number Diff line change 1
1
#include < ../include/gitexceptions.hpp>
2
2
3
- Exception::Exception (const std::string& msg) : message(msg) {}
4
-
5
3
// 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 (); }
You can’t perform that action at this time.
0 commit comments