Moodle
  1. Moodle
  2. MDL-33060

Fix all exceptions with get_string() calls within them

    Details

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

      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).

        Issue Links

          Activity

          Hide
          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
          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
          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
          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
          Dan Poltawski added a comment -

          Thanks Jerome, i've integrated this now.

          Show
          Dan Poltawski added a comment - Thanks Jerome, i've integrated this now.
          Hide
          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
          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
          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
          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: