Commit 92b4fdf
committed
fix(lsp): improve error handling and input validation for rename
- Add debug logging to prepareRename() and rename() catch handlers
- Filter out expected "method not found" errors from logging
- Add input validation for empty/whitespace newName parameter
- Update JSDoc to clarify null return semantics
- Add unit tests for empty newName validation
- Add documentation test for documentChanges normalization
Addresses PR #19 review feedback:
- Silent error handling now logs unexpected failures
- Ambiguous null returns are now documented1 parent 23fc7f5 commit 92b4fdf
2 files changed
Lines changed: 83 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
766 | 771 | | |
767 | 772 | | |
768 | 773 | | |
| |||
785 | 790 | | |
786 | 791 | | |
787 | 792 | | |
788 | | - | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
789 | 801 | | |
790 | 802 | | |
791 | 803 | | |
| |||
797 | 809 | | |
798 | 810 | | |
799 | 811 | | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
800 | 818 | | |
801 | 819 | | |
802 | 820 | | |
| |||
805 | 823 | | |
806 | 824 | | |
807 | 825 | | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
808 | 832 | | |
809 | 833 | | |
810 | 834 | | |
| |||
821 | 845 | | |
822 | 846 | | |
823 | 847 | | |
824 | | - | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
825 | 854 | | |
826 | 855 | | |
827 | 856 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
42 | 64 | | |
43 | 65 | | |
44 | 66 | | |
| |||
254 | 276 | | |
255 | 277 | | |
256 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
257 | 309 | | |
258 | 310 | | |
259 | 311 | | |
| |||
0 commit comments