forked from loafle/openapi-generator-original
Java: Add toString method to ApiException (#12851)
Previously, only the class name appeared in stacktrace whereas now relevant details are added. This applies to most Java-related generators.
This commit is contained in:
@@ -88,4 +88,13 @@ public class ApiException extends Exception {
|
||||
public String getResponseBody() {
|
||||
return responseBody;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ApiException{" +
|
||||
"code=" + code +
|
||||
", responseHeaders=" + responseHeaders +
|
||||
", responseBody='" + responseBody + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user