Skip to content

Commit

Permalink
Bump windows-kill version to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aliirdn committed Feb 15, 2018
1 parent eac0b44 commit e5c03d6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions windows-kill/windows-kill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using WindowsKillLibrary::sendSignal;
using WindowsKillLibrary::SIGNAL_TYPE_CTRL_C;
using WindowsKillLibrary::SIGNAL_TYPE_CTRL_BREAK;

#define WINDOWSKILL_VERSION "1.0.1"
#define WINDOWSKILL_VERSION "1.1.0"

int main(int argc,char *argv[])
{
Expand Down Expand Up @@ -68,9 +68,12 @@ int main(int argc,char *argv[])
if (strcmp(exception.what(), "ESRCH") == 0) {
std::cout << "Error: Pid dosen't exist." << std::endl;
}
else { // strcmp(exception.what(), "signal:type") == 0
else if(strcmp(exception.what(), "EINVAL") == 0){
std::cout << "Error: Invalid signal type." << std::endl;
}
else {
std::cout << "InvalidArgument: windows-kill-library:" << exception.what() << std::endl;
}
}
catch (const std::system_error& exception) {
std::cout << "SystemError " << exception.code() << ": " << exception.what() << std::endl;
Expand All @@ -80,7 +83,7 @@ int main(int argc,char *argv[])
std::cout << "Not enough permission to send the signal." << std::endl;
}
else {
throw;
std::cout << "RuntimeError: windows-kill-library:" << exception.what() << std::endl;
}
}
catch (const std::exception& exception) {
Expand Down

0 comments on commit e5c03d6

Please sign in to comment.