/**
  * Constructor for the class.
  * @param array $options An array of options for the plugin.
  */
 public function __construct($options)
 {
     if (isset($options[Config::KEY_TASKS])) {
         $options[Config::KEY_CONTROLLERS] = $options[Config::KEY_TASKS];
         unset($options[Config::KEY_TASKS]);
     }
     parent::__construct($options);
 }
 /**
  * Provides the handler with an opportunity to perform any last minute
  * error handling logic. The returned value will be serialized by the
  * handler's encoder.
  * @param Exception $e The exception that was thrown.
  * @return mixed Returns a serializable value that will be encoded and returned
  *         to the client.
  */
 public function handleException(Exception $e)
 {
     $responseCode = AbstractResponse::RESPONSE_SERVER_ERROR;
     if ($e instanceof RouterExceptionInterface) {
         $responseCode = $e->getAssociatedStatusCode();
     }
     \Vectorface\SnappyRouter\http_response_code($responseCode);
     return parent::handleException($e);
 }