public function setOpt($name, $value = null)
  {
    if(is_array($name))
    {
      try
      {
        $i = 0;
        foreach($name as $opt => $value)
        {
          $this->setOpt($opt, $value);
          ++$i;
        }
      }
      catch(CurlException $e)
      {
        throw $e->getCode() ? $e : new CurlException("Set failed at #$i: " . $e->getMessage());
      }
    }
    else
    {
      try
      {
        set_error_handler(
          function($s, $m, $f, $l, $c = null)
          use($name)
          {
            throw new CurlException("$m (" . CurlOptions::name($name) . ").");
          },
          \E_WARNING
        );
        $this->perform('curl_setopt', $name, $value);
      }
      finally
      {
        restore_error_handler();
      }
    }
  }