public function __construct($class, $id)
 {
     $reflection = new ReflectionClass($class);
     $model = $reflection->getShortName();
     $message = sprintf('Model `%s` not found by id `%s`. Try to set parent id in your model or use inner_hits feature.', $model, $id);
     parent::__construct($message);
 }
 public function __construct($class, $id = null)
 {
     $reflection = new ReflectionClass($class);
     $model = $reflection->getShortName();
     if ($id) {
         $message = sprintf('Model `%s` not found by id `%s`', $model, $id);
     } else {
         $message = sprintf('Model `%s` not found', $model);
     }
     parent::__construct($message);
 }
 public function __construct($name, \Exception $previous = null)
 {
     parent::__construct("{$name} not found", ErrorCode::MODEL_NOT_FOUND, $previous);
 }