Skip to content

Commit 9e5fbaf

Browse files
committed
fix typo
1 parent e5c03d6 commit 9e5fbaf

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

windows-kill-library/README.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -50,34 +50,34 @@ using WindowsKillLibrary::SIGNAL_TYPE_CTRL_C;
5050
using WindowsKillLibrary::SIGNAL_TYPE_CTRL_BREAK;
5151
5252
try {
53-
sendSignal(signal_pid, signal_type);
54-
std::cout << "Signal sent successfuly. type: " << signal_type << " | pid: " << signal_pid << "\n";
55-
}
56-
catch (const std::invalid_argument& exception) {
57-
if (strcmp(exception.what(), "ESRCH") == 0) {
58-
std::cout << "Error: Pid dosen't exist." << std::endl;
59-
}
60-
else if(strcmp(exception.what(), "EINVAL") == 0){
61-
std::cout << "Error: Invalid signal type." << std::endl;
62-
}
63-
else {
64-
std::cout << "InvalidArgument: windows-kill-library:" << exception.what() << std::endl;
65-
}
66-
}
67-
catch (const std::system_error& exception) {
68-
std::cout << "SystemError " << exception.code() << ": " << exception.what() << std::endl;
69-
}
70-
catch (const std::runtime_error& exception) {
71-
if (strcmp(exception.what(), "EPERM") == 0) {
72-
std::cout << "Not enough permission to send the signal." << std::endl;
73-
}
74-
else {
75-
std::cout << "RuntimeError: windows-kill-library:" << exception.what() << std::endl;
76-
}
77-
}
78-
catch (const std::exception& exception) {
79-
std::cout << "Error: windows-kill-library:" << exception.what() << std::endl;
80-
}
53+
sendSignal(signal_pid, signal_type);
54+
std::cout << "Signal sent successfuly. type: " << signal_type << " | pid: " << signal_pid << "\n";
55+
}
56+
catch (const std::invalid_argument& exception) {
57+
if (strcmp(exception.what(), "ESRCH") == 0) {
58+
std::cout << "Error: Pid dosen't exist." << std::endl;
59+
}
60+
else if(strcmp(exception.what(), "EINVAL") == 0){
61+
std::cout << "Error: Invalid signal type." << std::endl;
62+
}
63+
else {
64+
std::cout << "InvalidArgument: windows-kill-library:" << exception.what() << std::endl;
65+
}
66+
}
67+
catch (const std::system_error& exception) {
68+
std::cout << "SystemError " << exception.code() << ": " << exception.what() << std::endl;
69+
}
70+
catch (const std::runtime_error& exception) {
71+
if (strcmp(exception.what(), "EPERM") == 0) {
72+
std::cout << "Not enough permission to send the signal." << std::endl;
73+
}
74+
else {
75+
std::cout << "RuntimeError: windows-kill-library:" << exception.what() << std::endl;
76+
}
77+
}
78+
catch (const std::exception& exception) {
79+
std::cout << "Error: windows-kill-library:" << exception.what() << std::endl;
80+
}
8181
```
8282

8383
### WindowsKillLibrary::SIGNAL_TYPE_CTRL_BREAK

0 commit comments

Comments
 (0)