Exemplo n.º 1
0
 /**
  * @param LocationInterface $location
  * @param Request           $request
  *
  * @throws \Exception
  */
 public function publish(LocationInterface $location, Request $request)
 {
     $interaction = Interaction::publish($location, $request);
     $this->profile->add($interaction);
     $interaction->start();
     try {
         $this->driver->publish($location, $request);
     } catch (\Exception $exception) {
         $interaction->fail($exception);
         $interaction->stop();
         throw $exception;
     }
     $interaction->stop();
 }