[Loris-dev] PEAR error reporting
David MacFarlane, Mr
david.macfarlane2 at mcgill.ca
Mon Jun 5 15:01:15 EDT 2017
It's no longer required. You can just do "Database::singleton()" without the PEAR::isError boilerplate. It'll throw a proper exception instead of returning a PEAR error if there's an exceptional circumstance.
- Dave
________________________________
From: loris-dev-bounces at bic.mni.mcgill.ca <loris-dev-bounces at bic.mni.mcgill.ca> on behalf of Tom Beaudry <waveflux at gmail.com>
Sent: June 5, 2017 2:57:00 PM
To: loris-dev at bic.mni.mcgill.ca
Subject: [Loris-dev] PEAR error reporting
Hi Guys,
What's the new way to do PEAR error reporting in 17.02 / LORISForms?
I have an instrument with a score function that contains:
//get the saved scores
$db =& Database::singleton();
if(PEAR::isError($db)) {
return PEAR::raiseError ("Could not connect to database".$db->getMessage());
}
What should it be changed to?
Thanks!
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bic.mni.mcgill.ca/pipermail/loris-dev/attachments/20170605/2e589a4e/attachment.html>
More information about the Loris-dev
mailing list