Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-1095

Deleting an item that is still in use (Foreign key violation) should give a nice warning message instead of error dialog

XMLWordPrintable

      Not sure what's the best way to implement this.

      One way is to detect if it's a the foreign-key-violation-exception (often in a causes tree).
      But I don't want to have a try-catch around everything, so we probably want to do that generically in the errorDialog handler. In the future, an AuthorizationException will need to be handled in a similar manner.

      In any case, these need to be presented as a warning dialog instead of an error dialog (= yellow instead of red) and the message should clearly say something like "The record that you're trying to delete cannot be deleted because it's used by other records."

            cchianel Christopher Chianelli
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: