setContentView() public method

It is a good idea to call {@link stopPropagation()} after that so that other listeners won't override it.
public setContentView ( eZ\Publish\Core\MVC\Symfony\View\View $contentView )
$contentView eZ\Publish\Core\MVC\Symfony\View\View
 public function onAPIContentException(APIContentExceptionEvent $event)
 {
     $exception = $event->getApiException();
     $contentMeta = $event->getContentMeta();
     if ($exception instanceof ConverterNotFound) {
         if (isset($this->logger)) {
             $this->logger->notice('Missing field converter in legacy storage engine, forwarding to legacy kernel.', array('content' => $contentMeta));
         }
         if (isset($contentMeta['locationId'])) {
             $event->setContentView($this->legacyLVP->getView(new Location(array('id' => $contentMeta['locationId'])), $contentMeta['viewType']));
         } else {
             if (isset($contentMeta['contentId'])) {
                 $event->setContentView($this->legacyCVP->getView(new ContentInfo(array('id' => $contentMeta['contentId'])), $contentMeta['viewType']));
             }
         }
         $event->stopPropagation();
     }
 }