Reviewed:  https://reviews.mahara.org/10661
Committed: 
https://git.mahara.org/mahara/mahara/commit/9b35263dde89fb94b74b11806ae028dd2d83ff45
Submitter: Cecilia Vela Gurovic ([email protected])
Branch:    master

commit 9b35263dde89fb94b74b11806ae028dd2d83ff45
Author: Robert Lyon <[email protected]>
Date:   Tue Dec 10 09:12:34 2019 +1300

Bug 1855771: Allow generic system errors to give more detail

So that we can debug things easier

The Exception class has two useful methods, getFile() and getLine()
so we can use these to dispaly where the problem is rather than just
a generic:  exception(object(ParseError)) at Unknown:0

To test:
- a syntax mistake - add a log_debug() line before the first function in a class
and see if the error shows the correct file/line
- MaharaException - add the following line somewher ein the code
throw new MaharaException("Missing bananas");
and see if the error shows the correct file/line

behatnotneeded

Change-Id: I5a254f842ab6444ebb324e11e2c93d1c44e3e1d3
Signed-off-by: Robert Lyon <[email protected]>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1855771

Title:
  Allow non-mahara exceptions to show a bit more detail

Status in Mahara:
  Fix Committed

Bug description:
  When you see errors like:

  [WAR] 9c (lib/errors.php:536) [ParseError]: syntax error, unexpected 'parent' 
(T_STRING), expecting function (T_FUNCTION)
   Call stack (most recent first):
     * exception(object(ParseError)) at Unknown:0
   
  It is not obvious to where the problem is - especially if you are 
cherry-picking in a bunch of patches and so are not familiar with the code

  With PHP Exception class there are some bits we can harness to help up
  https://www.php.net/manual/en/class.exception.php

  The getFile() and getLine() methods will be useful

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1855771/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to