Commit 5f195a7
* Improve bin/dev kill error handling for process termination
Enhance the terminate_processes method to distinguish between ESRCH
(process already stopped) and EPERM (permission denied) errors, providing
clearer feedback to users when process termination fails.
Key improvements:
- Separate handling for ESRCH vs EPERM exceptions
- User warning when permission is denied for a process
- Clearer indication of what actually happened during process termination
This change aligns with the pattern implemented in react_on_rails-demos
PR #42 for better process management.
Fixes #1858
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
* Add comprehensive test coverage and edge case handling for terminate_processes
Improvements based on PR feedback:
1. Test Coverage:
- Add 7 new test cases for terminate_processes method
- Cover ESRCH, EPERM, ArgumentError, RangeError scenarios
- Test mixed success/error cases
2. Edge Case Handling:
- Handle ArgumentError (invalid signal)
- Handle RangeError (invalid PID)
- Consistent with file_manager.rb patterns
3. Return Value Consistency:
- All rescue branches now explicitly return nil
- Consistent behavior across all error types
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
1 parent 24496cd commit 5f195a7
File tree
2 files changed
+66
-1
lines changed- lib/react_on_rails/dev
- spec/react_on_rails/dev
2 files changed
+66
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
206 | 266 | | |
207 | 267 | | |
208 | 268 | | |
| |||
0 commit comments