Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/main/java/com/microsoft/lst_bench/task/TaskExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.microsoft.lst_bench.telemetry.ImmutableEventInfo;
import com.microsoft.lst_bench.telemetry.SQLTelemetryRegistry;
import com.microsoft.lst_bench.util.StringUtils;
import java.sql.SQLException;
import java.time.Instant;
import java.util.Map;
import org.slf4j.Logger;
Expand Down Expand Up @@ -97,9 +98,20 @@ public void executeTask(Connection connection, TaskExec task, Map<String, Object
"Exception executing statement: "
+ statement.getId()
+ ", statement text: "
+ statement.getStatement()
+ "; error message: "
+ e.getMessage();
+ statement.getStatement();

// sql server driver exception messages
if (e instanceof SQLException) {
SQLException sqlException = (SQLException) e;
loggedError +=
"; SQL State: "
+ sqlException.getSQLState()
+ "; Error Code: "
+ sqlException.getErrorCode();
}

loggedError += "; Error message: " + e.getMessage();

for (String skipException : exceptionStrings) {
if (e.getMessage().contains(skipException)) {
LOGGER.warn(loggedError);
Expand Down