public function getError($componentName = null, $default = null)
    {
        $result = $default;

        if (null === $componentName) {
            $result = $this->error;

        } else {
            if ($this->hasError($componentName)) {
                $result = $this->error[$componentName];
            }
        }

        return $result;
    }