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

Better error message if you try to pass an object as $debuginfo for an exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.3
    • 2.3
    • Libraries
    • MOODLE_23_STABLE
    • MOODLE_23_STABLE
    • Hide

      Create a test script like:

      <?php
      require_once('config.php');
      throw new coding_exception('Oops', new stdClass());

      when you run it, you should be able to see that the error was caused by line 3 of test.php.

      Show
      Create a test script like: <?php require_once('config.php'); throw new coding_exception('Oops', new stdClass()); when you run it, you should be able to see that the error was caused by line 3 of test.php.

      See the comments on MDL-23884 where currently the error messages are very unhelpful. With this one-line change, the error is triggered in a place where the stack-trace is much more helpful.

            timhunt Tim Hunt
            timhunt Tim Hunt
            Petr Skoda Petr Skoda
            Dan Poltawski Dan Poltawski
            Dan Poltawski Dan Poltawski
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.