vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

Diagnostic for Uncaught Exception

Open adityasinha26 opened this issue 3 years ago • 4 comments

Feature description or problem with existing feature

Right now we can generate doc for a function which correctly figures out what kind of exceptions would be thrown by a function. It would be great if we can get a diagnostic for it at the calling site.

Describe the solution you'd like

  1. Diagnostic that an exception might be thrown.
  2. Code action to add a try catch block

adityasinha26 avatar Jul 01 '21 19:07 adityasinha26

Nice idea. Which lines would get wrapped in try? Just the call that throws? The current cursor selection?

bmewburn avatar Jul 01 '21 22:07 bmewburn

Nice idea. Which lines would get wrapped in try? Just the call that throws? The current cursor selection?

It would be best if done for the cursor selection. Even just having the diagnostic would be very effective.

adityasinha26 avatar Jul 02 '21 12:07 adityasinha26

Nice idea. Which lines would get wrapped in try? Just the call that throws? The current cursor selection?

Well I think it would save some time if only the @throws calls were grouped in the try

fadrian06 avatar Dec 22 '23 05:12 fadrian06

active in 2024? :(

fadrian06 avatar Jun 18 '24 07:06 fadrian06