Skip to content

Commit

Permalink
Add toString method to FailureInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
pajaks authored and ebyhr committed Jul 5, 2024
1 parent 52f22eb commit b816cf1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/trino-client/src/main/java/io/trino/client/FailureInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.util.List;

import static com.google.common.base.MoreObjects.toStringHelper;
import static java.util.Objects.requireNonNull;

@Immutable
Expand Down Expand Up @@ -107,4 +108,18 @@ public RuntimeException toException()
{
return new FailureException(this);
}

@Override
public String toString()
{
return toStringHelper(this)
.add("type", type)
.add("message", message)
.add("cause", cause)
.add("suppressed", suppressed)
.add("stack", stack)
.add("errorInfo", errorInfo)
.add("errorLocation", errorLocation)
.toString();
}
}

0 comments on commit b816cf1

Please sign in to comment.