D
D
devilsD2018-06-14 15:30:25
PHP
devilsD, 2018-06-14 15:30:25

Why doesn't try catch work on yiith exceptions?

I need to override the ActiveRecord getter like this:

public function __get($name)
    {
        try {
            return parent::__get($name);
        } catch (Exception $e) {
            return $name; // моя магия           
        }     
    }

But in the try block it throws an error "Getting unknown property"

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question