SaptarshiSarkar12 / Drifty

Drifty is an Open-Source Interactive File Downloader System built with Java
https://saptarshisarkar12.github.io/Drifty/
Apache License 2.0
172 stars 120 forks source link

Enhance Exception Handling Across GUI Windows #550

Open coderabbitai[bot] opened 2 months ago

coderabbitai[bot] commented 2 months ago

It has been noted that the current implementation of GUI windows lacks comprehensive exception handling. This can lead to application instability if exceptions occur during the window's loading or initialization process.

Proposed Enhancement:

  1. Implement Try-Catch Blocks: Wrap calls to .show() methods within try-catch blocks to gracefully handle exceptions.
  2. Log and Notify: In the catch block, log the exception details and notify the user through the GUI.

Example Code:

try {
    settingsWin.show();
} catch (Exception e) {
    System.err.println('Failed to open settings window: ' + e.getMessage());
    // Additional error handling logic here
}

Optimization Suggestions:

This issue aims to systematically address and improve exception handling across all GUI windows to enhance application stability and user experience.

github-actions[bot] commented 2 months ago

Hello 👋! Thank you very much for raising an issue 🙌! The maintainers will get back to you soon for discussion over the issue! 🚀

Meanwhile you can also discuss about the project in our Discord Server 😀