Feb-16-2020, 07:55 AM
Hello. I would like to know if there is a way to derive the name of the function that has an exception.
I would like to better highlight through debugging which function is in exception. but writing the name of the function by hand is long and boring.
I would like to better highlight through debugging which function is in exception. but writing the name of the function by hand is long and boring.
def GUI_GetRGB(self, event): global CamOpen try: click_x = int(mouse_over.Mouse_X / (Frame_Width/Pixmap_width)) click_y = int(mouse_over.Mouse_Y / (Frame_Width/Pixmap_width)) if not (len(CamFram) == 0): self.GUI.TW_WORK.setItem(3, 1, QTableWidgetItem('{},{}' .format(click_x, click_y))) R, G, B = CamFram[-1][click_y, click_x] self.GUI.TW_WORK.setItem(4, 1, QTableWidgetItem('{},{},{}' .format(R, G, B))) except Exception as msg: logging.error('Error GUI_GetRGB: ' + str(msg))