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

(another) try..catch(Exception $e)

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.11.3
    • None
    • Course
    • None
    • MOODLE_311_STABLE

    Description

      I'm possibly a bit obsessed but try...catch($e) {...generic error...} is both pointless and masks the actual error for no good reason. 

      This time course/classes/task/course_delete_modules.php lines 65 to 69

      Something went wrong with a module delete for me but (for some reason) I'm being prevented from seeing the underlying error. try...catch should only even be used to trap specific exceptions and then do something to handle them. 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              howardsmiller Howard Miller
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: