public function error($str, $code = Response::STATUS_ERROR)
    {
        $this->addError(new Error($str, $code));
        Container::get('response')->setStatus($code);
        if (!Container::get('response')->isStatus(Response::STATUS_OK)) {
            $this->serve();
        }
    }