Skip to content

Commit

Permalink
fixed style
Browse files Browse the repository at this point in the history
  • Loading branch information
tihmstar committed Jan 27, 2021
1 parent b7802ee commit bafb59f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions include/libgeneral/exception.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ namespace tihmstar {
char *_err;
public:
exception(const char *commit_count_str, const char *commit_sha_str, int line, const char *filename, const char *err ...);

exception(const exception &e); //copy constructor
exception(const exception &cpy); //copy constructor
virtual ~exception() override;

//custom error can be used
virtual const char *what() const noexcept override;
Expand All @@ -37,8 +37,6 @@ namespace tihmstar {
//Information about build
virtual std::string build_commit_count() const;
virtual std::string build_commit_sha() const;

~exception();
};
};

Expand Down
8 changes: 4 additions & 4 deletions libgeneral/exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ _err(NULL)
}
}

exception::~exception(){
safeFree(_err);
}

const char *exception::what() const noexcept {
return _err;
}
Expand All @@ -66,7 +70,3 @@ std::string exception::build_commit_count() const {
std::string exception::build_commit_sha() const {
return _commit_sha_str;
};

exception::~exception(){
safeFree(_err);
}

0 comments on commit bafb59f

Please sign in to comment.