File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ using WindowsKillLibrary::sendSignal;
1010using WindowsKillLibrary::SIGNAL_TYPE_CTRL_C;
1111using WindowsKillLibrary::SIGNAL_TYPE_CTRL_BREAK;
1212
13- #define WINDOWSKILL_VERSION " 1.0.1 "
13+ #define WINDOWSKILL_VERSION " 1.1.0 "
1414
1515int 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) {
You can’t perform that action at this time.
0 commit comments