Phalcon Debug doesn't do anything
Question
I have just started getting into Phalcon, however I have a problem with error displays and all sorts of error handling.
In my bootstrap file I have
$listener = new \Phalcon\Debug();
$listener->listen();
Which doesn't seem to generate anything. I have explicitly coded an error like so:
public function indexAction() {
$recentPackages = Package::find(1,2,3,
array(
"order" => "updated DESC",
"limit" => 10)
);
$this->view->setVar("recentPackages", $recentPackages);
}
However, the error that comes out is simply a white page with :
Wrong number of parameters
I am running Phalcon 1.2.4. Is there something else I am missing? I followed the documentation here, but can't seem to get it to work.
Solution
You have to remove the try/catch from your public/index.php
OTHER TIPS
http://docs.phalconphp.com/en/latest/reference/debug.html
In your public/index.php file
change value in cactch(\Exception $e) {...HERE...}
For example from phalconphp.com doc.
try {
//... app code ...
} catch(\Exception $e) {
echo get_class($e), ": ", $e->getMessage(), "\n";
echo " File=", $e->getFile(), "\n";
echo " Line=", $e->getLine(), "\n";
echo $e->getTraceAsString();
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow