Skip to content

Commit

Permalink
Merge pull request #9018 from Param999/develop
Browse files Browse the repository at this point in the history
Added failure message for commands
  • Loading branch information
luigidellaquila authored Oct 1, 2019
2 parents 000d828 + 4a6d078 commit a579512
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2971,8 +2971,9 @@ private void browseRecords(final OIdentifiableIterator<?> it) {
tableFormatter.writeRecords(currentResultSet, limit);
}

private Object sqlCommand(final String iExpectedCommand, String iReceivedCommand, final String iMessage,
private Object sqlCommand(final String iExpectedCommand, String iReceivedCommand, final String iMessageSuccess,
final boolean iIncludeResult) {
final String iMessageFailure = "\nCommand failed.\n";
checkForDatabase();

if (iReceivedCommand == null)
Expand All @@ -2991,9 +2992,9 @@ private Object sqlCommand(final String iExpectedCommand, String iReceivedCommand
float elapsedSeconds = getElapsedSecs(start);

if (iIncludeResult)
message(iMessage, result, elapsedSeconds);
message(iMessageSuccess, result, elapsedSeconds);
else
message(iMessage, elapsedSeconds);
message(iMessageFailure, elapsedSeconds);

return result;
}
Expand Down

0 comments on commit a579512

Please sign in to comment.