Skip to content

Commit

Permalink
Merge pull request #1475 from NREL/PATErrors
Browse files Browse the repository at this point in the history
Pat errors
  • Loading branch information
macumber committed Feb 19, 2015
2 parents 5dca1eb + 53bd09c commit a7f0f74
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
15 changes: 11 additions & 4 deletions openstudiocore/src/openstudio_lib/ApplyMeasureNowDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,17 @@ void ApplyMeasureNowDialog::displayResults()
try{
runmanager::Files files(m_job->outputFiles());
openstudio::path stdErrPath = files.getLastByFilename("stderr").fullPath;
std::ifstream ifs(toString(stdErrPath).c_str());
std::string stdMessage((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
ifs.close();
m_advancedOutput = toQString(stdMessage);

m_advancedOutput = "";

QFile file(toQString(stdErrPath));
if (file.open(QFile::ReadOnly))
{
QTextStream docIn(&file);
m_advancedOutput = docIn.readAll();
file.close();
}

m_advancedOutput += QString("\n");
}catch(std::exception&){
}
Expand Down
18 changes: 11 additions & 7 deletions openstudiocore/src/pat_app/RunView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
#include <QMessageBox>
#include <QRadioButton>

#include <fstream>

namespace openstudio {

namespace pat {
Expand Down Expand Up @@ -1265,11 +1263,17 @@ void DataPointJobItemView::update()
try{
runmanager::Files files(m_workflowStepJob.outputFiles().get());
openstudio::path stdErrPath = files.getLastByFilename("stderr").fullPath;
std::ifstream ifs(toString(stdErrPath).c_str());
std::string stdErrorMessage((std::istreambuf_iterator<char>(ifs)), std::istreambuf_iterator<char>());
ifs.close();
if (!stdErrorMessage.empty()){
dataPointJobContentView->addStdErrorMessage(stdErrorMessage);

QFile file(toQString(stdErrPath));
if (file.open(QFile::ReadOnly))
{
QTextStream docIn(&file);
QString stdErrorMessage = docIn.readAll();
file.close();

if (!stdErrorMessage.isEmpty()){
dataPointJobContentView->addStdErrorMessage(toString(stdErrorMessage));
}
}
}catch(std::exception&){

Expand Down

10 comments on commit a7f0f74

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (macumber) - x86_64-MacOS-10.9-clang: Tests Failed

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (macumber) - x86_64-Linux-Ubuntu-14.04-clang-3.5: OK (2178 of 2204 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (macumber) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)

Build Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (macumber) - i386-Windows-7-VisualStudio-12: OK (2188 of 2204 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

develop (macumber) - Win64-Windows-7-VisualStudio-12: OK (2189 of 2204 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (macumber) - x86_64-MacOS-10.9-clang: Tests Failed

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (macumber) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)

Build Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (macumber) - x86_64-Linux-Ubuntu-14.04-clang-3.5: OK (2082 of 2204 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (macumber) - i386-Windows-7-VisualStudio-12: OK (2187 of 2204 tests passed)

Build Badge Test Badge

@nrel-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iteration (macumber) - Win64-Windows-7-VisualStudio-12: Tests Failed

Build Badge Test Badge

Please sign in to comment.