def _catch_page_hooks(self):
    '\n        Raises errors, if users define page hooks on a section.\n        '
    explanation = ' This does not work. Remove the method to continue.'
    try:
        self.on_first_show()
        msg = f"You tried to use the page-only hook method 'on_first_show' on the section {self}."
        raise AlfredError((msg + explanation))
    except AttributeError:
        pass
    try:
        self.on_each_show()
        msg = f"You tried to use the page-only hook method 'on_each_show' on the section {self}."
        raise AlfredError((msg + explanation))
    except AttributeError:
        pass
    try:
        self.on_each_hide()
        msg = f"You tried to use the page-only hook method 'on_each_hide' on the section {self}."
        raise AlfredError((msg + explanation))
    except AttributeError:
        pass
    try:
        self.on_first_hide()
        msg = f"You tried to use the page-only hook method 'on_first_hide' on the section {self}."
        raise AlfredError((msg + explanation))
    except AttributeError:
        pass
Raises errors, if users define page hooks on a section.
def _catch_page_hooks(self):
    '\n        \n        '
    explanation = ' This does not work. Remove the method to continue.'
    try:
        self.on_first_show()
        msg = f"You tried to use the page-only hook method 'on_first_show' on the section {self}."
        raise AlfredError((msg + explanation))
    except AttributeError:
        pass
    try:
        self.on_each_show()
        msg = f"You tried to use the page-only hook method 'on_each_show' on the section {self}."
        raise AlfredError((msg + explanation))
    except AttributeError:
        pass
    try:
        self.on_each_hide()
        msg = f"You tried to use the page-only hook method 'on_each_hide' on the section {self}."
        raise AlfredError((msg + explanation))
    except AttributeError:
        pass
    try:
        self.on_first_hide()
        msg = f"You tried to use the page-only hook method 'on_first_hide' on the section {self}."
        raise AlfredError((msg + explanation))
    except AttributeError:
        pass