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

handle exception during commit or rollback in EditManagerImpl #327

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nprigour
Copy link
Contributor

Proposed PR to provide UI feedback and further actions when an exception occurs during EditManagerImpl commit or rollback
see also the related discussion at udig-dev list
Signed-off-by: Nikolaos Pringouris nprigour@gmail.com

Signed-off-by: Nikolaos Pringouris <nprigour@gmail.com>
@sloob
Copy link
Contributor

sloob commented Dec 19, 2018

Hi @nprigour
thanks for the provided PR.
Maybe it would be better to throw an exception instead of opening a message dialog. So the surrounding application can do whatever it wants with the thrown exception.
For our application, a dialog with an English message is not a good solution.

Thanks!

@nprigour
Copy link
Contributor Author

nprigour commented Jan 12, 2019

Hi,

  • Regarding the english message indeed you are right. I should try to modify code and internationalize by using appropriate message properties files.
  • Regarding the message dialog box I assumed this as a nice solution in order the udig application user to have direct feedback of the error. I think that I also experienced with throwing an exception in the past but I had some undesirable results (although this happened some years ago and I did not remember the exact problem). For the udig application opening a message dialog is a good solution however maybe if you use the udig SDK in your custom application a different behavior might be desired. An improvement that I can think of is to provide a protected method handleCommitRollbackError() in EditMamagerImpl class with a default implementation (that displays the dialog box). Then in your custom application you can easily override it according to your needs. What do you think of this approach?

@fgdrf
Copy link
Contributor

fgdrf commented Sep 18, 2019

Any progress here for internationalization and what about suggested handleCommitRollbackError() method?

I'm asking myself if its allowed to commit/rollback using API from e.g. some background tasks. If the user requested a rollback using Action in UI I'm fine with a dialog.
If a process is running, e.g. changes multible features with specific algorithm would EditManager be invokeed to have support for undo/redo as well as transactionsupport? If so I assume a User would interact with the application and needs feedback that something went wrong...

Opinions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants