Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-33060

Fix all exceptions with get_string() calls within them

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: Web Services
    • Labels:

      Description

      Eloy said:

      Looking for uses of exceptions, I ended with this grep:

      grep -Pr "new.*exception[^\"']*get_string" *

      There are a lot of bad uses of exceptions with get_string() calls within them. We need to take rid of that ASAP, both in "normal" exceptions (first param is the errorcode no point about one get_string() call there) and also webservice_access_exception (first param is debuginfo and it cannot be translated). I'd recommend to create one issue about his point (in case it does not exist yet).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              jerome Jérôme Mouneyrac added a comment - - edited

              I changed some webservice_access_exception into moodle_exception when it was useful for the client to implement some code logic against the error code. Also note that I delete the keystring for the few times it was possible, when it's not removed it's because it's still used in some other places.

              Show
              jerome Jérôme Mouneyrac added a comment - - edited I changed some webservice_access_exception into moodle_exception when it was useful for the client to implement some code logic against the error code. Also note that I delete the keystring for the few times it was possible, when it's not removed it's because it's still used in some other places.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
              Hide
              poltawski Dan Poltawski added a comment -

              Thanks Jerome, i've integrated this now.

              Show
              poltawski Dan Poltawski added a comment - Thanks Jerome, i've integrated this now.
              Hide
              poltawski Dan Poltawski added a comment -

              I tested for regressions around the place and couldn't find any so I think this is good. Passing.

              Show
              poltawski Dan Poltawski added a comment - I tested for regressions around the place and couldn't find any so I think this is good. Passing.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads).

              Thanks!

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads). Thanks!

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    25/Jun/12