public function errors($exit_on_error = false)
    {
        if (!empty($this->errors)) {

            foreach (gplcart_array_flatten($this->errors) as $error) {
                $this->error($error);
            }

            $this->errors = array();

            if ($exit_on_error) {
                $this->abort(1);
            }
        }
    }