def METHOD_NAME(self, pw: ProgramWidget, exit_code: int, exit_status: QProcess.ExitStatus):
    self.console_widget.METHOD_NAME(pw, exit_code, exit_status)
    if exit_code != 0 and exit_code != 15:
        self.programs_state = TabProgramsState.ERROR
    else:
        if len(self.programs_widget.layout().children()) == 0 and self.programs_state != TabProgramsState.ERROR:
            self.programs_state = TabProgramsState.IDLE
    self.program_state_changed.emit(self.programs_state)