public function addError(Error $error, $prepend = false)
    {
        if ($prepend === true) {
            array_unshift($this->errors, $error);
        }
        else {
            $this->errors[] = $error;
        }
        return count($this->errors);
    }