Skip to content

Commit e5c03d6

Browse files
committed
Bump windows-kill version to 1.1.0
1 parent eac0b44 commit e5c03d6

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

windows-kill/windows-kill.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using WindowsKillLibrary::sendSignal;
1010
using WindowsKillLibrary::SIGNAL_TYPE_CTRL_C;
1111
using WindowsKillLibrary::SIGNAL_TYPE_CTRL_BREAK;
1212

13-
#define WINDOWSKILL_VERSION "1.0.1"
13+
#define WINDOWSKILL_VERSION "1.1.0"
1414

1515
int main(int argc,char *argv[])
1616
{
@@ -68,9 +68,12 @@ int main(int argc,char *argv[])
6868
if (strcmp(exception.what(), "ESRCH") == 0) {
6969
std::cout << "Error: Pid dosen't exist." << std::endl;
7070
}
71-
else { // strcmp(exception.what(), "signal:type") == 0
71+
else if(strcmp(exception.what(), "EINVAL") == 0){
7272
std::cout << "Error: Invalid signal type." << std::endl;
7373
}
74+
else {
75+
std::cout << "InvalidArgument: windows-kill-library:" << exception.what() << std::endl;
76+
}
7477
}
7578
catch (const std::system_error& exception) {
7679
std::cout << "SystemError " << exception.code() << ": " << exception.what() << std::endl;
@@ -80,7 +83,7 @@ int main(int argc,char *argv[])
8083
std::cout << "Not enough permission to send the signal." << std::endl;
8184
}
8285
else {
83-
throw;
86+
std::cout << "RuntimeError: windows-kill-library:" << exception.what() << std::endl;
8487
}
8588
}
8689
catch (const std::exception& exception) {

0 commit comments

Comments
 (0)