/** * @throws \Exception * @param $method * @param $args * @return mixed */ public function __call($method, $args) { try { $r = $this->callResourceMethod($method, $args); return $r; } catch (\Exception $e) { return Resource::errorHandler($method, $args, $e); } }