[weird behavior of auto generate when generating try-catch]
Environment
- Operating System: macOS 12.6(Monterey)
- JDK version: java(TM) SE Runtime Environment (build 18.0.2.1+1-1)
- Visual Studio Code version: 1.71.2 (Universal)
- Java extension version: v1.11.0
Steps To Reproduce
<-- insert
try {
} catch (Exception e) {
// TODO: handle exception
}
throw new Exception(); <-- use Quick Fix; "Surround with try/catch"
try {
} catch (Exception e) {
// TODO: handle exception
}
try {
throw new Exception(); <-- surrounded by Quick Fix
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
try {
} catch (Exception e) {
// TODO: handle exception
}
Current Result
Even if this variable name "e1" were "e", it won't conflict any other variables.
Expected Result
Maybe (Exception e) is correct behavior.
Additional Informations
[weird behavior of auto generate when generating try-catch]
Environment
Steps To Reproduce
<-- insert try { } catch (Exception e) { // TODO: handle exception }throw new Exception(); <-- use Quick Fix; "Surround with try/catch" try { } catch (Exception e) { // TODO: handle exception }try { throw new Exception(); <-- surrounded by Quick Fix } catch (Exception e1) { // TODO Auto-generated catch block e1.printStackTrace(); } try { } catch (Exception e) { // TODO: handle exception }Current Result
Even if this variable name "e1" were "e", it won't conflict any other variables.
Expected Result
Maybe (Exception e) is correct behavior.
Additional Informations