Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin user messages and errors #6

Open
5 of 7 tasks
shyamamrith opened this issue Jul 13, 2022 · 1 comment
Open
5 of 7 tasks

Plugin user messages and errors #6

shyamamrith opened this issue Jul 13, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@shyamamrith
Copy link
Collaborator

shyamamrith commented Jul 13, 2022

Add in code at each relevant stage which checks that the user inputs are as expected to avoid errors. Also notices, warnings and errors to push to the user to make the process clearer.

  • Work out how to push messages to the QGIS console
  • Add most important messages
  • Simstock running
  • Simstock finished/failed
  • Initial setup success/fail
  • Check types and formatting of input attribute table
  • Report which E+ model failed if so so that user can fix issues
  • Supress the idd warning that keeps coming up - these warnings can confuse the user that something has gone wrong
  • Replace or complement Python raised errors with QGIS ones - can use 'return' to exit a function without raising a Python error or using sys.exit() (the latter exits the entire QGIS session)
  • Catch if user has not yet performed the initial setup and provide a useful message instructing them to do so
@shyamamrith shyamamrith self-assigned this Jul 13, 2022
@shyamamrith shyamamrith changed the title Plugin data checks and user errors Plugin user messages and errors Feb 10, 2023
@shyamamrith shyamamrith transferred this issue from another repository Apr 24, 2023
@shyamamrith shyamamrith reopened this Sep 18, 2023
@shyamamrith
Copy link
Collaborator Author

Would be good to replace (or complement) the Python raised errors with QGIS log errors for a better and clearer user experience

shyamamrith added a commit that referenced this issue Oct 20, 2023
Using return, the code can be stopped when an exception occurs without actually raising an exception (which displays badly in QGIS). More exceptions need to be replaced with this.
@shyamamrith shyamamrith added the enhancement New feature or request label Oct 20, 2023
shyamamrith added a commit that referenced this issue Oct 22, 2023
Raising in the proper QGIS way instead of Python errors. There are still a few more in the results routines that need to be changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant