def _on_database_select(self, _): """Load chosen database""" self.structure_drop.reset() if (self.database[1] is None or getattr(self.database[1], "base_url", None) is None): self.query_button.tooltip = "Search - No database chosen" self.freeze() else: self.offset = 0 self.number = 1 self.structure_page_chooser.silent_reset() try: self.freeze() self.query_button.description = "Updating ..." self.query_button.icon = "cog" self.query_button.tooltip = "Updating filters ..." self._set_intslider_ranges() self._set_version() except Exception as exc: # pylint: disable=broad-except LOGGER.error( "Exception raised during setting IntSliderRanges: %s", exc.with_traceback(), ) finally: self.query_button.description = "Search" self.query_button.icon = "search" self.query_button.tooltip = "Search" self.unfreeze()
def __init__(self, *args: Tuple[Any]): LOGGER.error( "%s raised.\nError message: %s\nAbout this exception: %s", args[0].__class__.__name__ if args and isinstance(args[0], Exception) else self.__class__.__name__, str(args[0]) if args else "", args[0].__doc__ if args and isinstance(args[0], Exception) else self.__doc__, ) super().__init__(*args)