public function __construct(Profile $owner, Profile $reader = null)
 {
     $this->owner = $owner;
     $this->reader = $reader;
     // TRANS: Message when a private stream attemps to be read by unauthorized third party.
     $msg = sprintf(_m('This stream is protected and only authorized subscribers may see its contents.'));
     // If $reader is a profile, authentication has been made but still not accepted (403),
     // otherwise authentication may give access to this resource (401).
     parent::__construct($msg, $reader instanceof Profile ? 403 : 401);
 }
 /**
  * @param Exception $parent
  */
 public function __construct(Exception $parent)
 {
     parent::__construct($parent->getMessage(), $parent->getCode(), $parent);
 }