Make STEP export process crash more visible.

This commit is contained in:
Alex Shvartzkop 2023-12-06 08:46:24 +03:00
parent 9345b73af5
commit b7840f4f82
1 changed files with 19 additions and 1 deletions

View File

@ -170,12 +170,30 @@ void DIALOG_EXPORT_STEP_LOG::onProcessTerminate( wxProcessEvent& aEvent )
m_stdioThread = nullptr;
m_sdbSizerOK->Enable( true );
int exitCode = aEvent.GetExitCode();
// set the progress bar to complete/incomplete base don status
m_activityGauge->SetRange( 1 );
if( aEvent.GetExitCode() )
if( exitCode != 0 )
{
m_textCtrlLog->SetForegroundColour( *wxRED );
m_textCtrlLog->AppendText( wxS( "\n*** " ) );
m_textCtrlLog->AppendText(
wxString::Format( _( "Process failed with exit code %d" ), exitCode ) );
m_textCtrlLog->AppendText( wxS( " ***\n" ) );
m_activityGauge->SetValue( 0 );
}
else
{
m_textCtrlLog->AppendText( wxS( "\n*** " ) );
m_textCtrlLog->AppendText( wxString::Format( _( "Success" ) ) );
m_textCtrlLog->AppendText( wxS( " ***\n" ) );
m_activityGauge->SetValue( 1 );
}
}
}