We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

BUG???? something about view

In Controller:

...

public function BasicAction(){
    $this->_init();
    $this->error('deny2');
}

public function _init(){
        $this->error('deny1');
}
    public function error($value=''){
    $this->view->setVar('msg',$value);
    $this->view->pick(array(ucfirst($this->config->application->themeName).'/Public/error'));
}
...

in my  minds, it should stop and show 'deny1',But it show 'deny2';why???how to make it stop and show 'deny1'?


85.5k
return "deny1"; 

?

Use try catch. and Throw new \Exception.