<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _raise_page_error(self):
 """ raise the correct type of page error """

        if hasattr(self, "title"):
            raise PageError(title=self.title)
        else:
            raise PageError(pageid=self.pageid)