Skip to content

Commit

Permalink
More Error Info (#683)
Browse files Browse the repository at this point in the history
Made the error code on http exception public. fixed some deprecation warnings in the s3 test runner.
  • Loading branch information
JonathanHenson authored Sep 18, 2023
1 parent f4fb56a commit 4fd525f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* JNI bindings to the AWS Common Runtime
*/
public class HttpException extends RuntimeException {
private int errorCode;
private final int errorCode;

/**
* Constructs a new HttpException
Expand All @@ -24,11 +24,11 @@ public HttpException(int errorCode) {
}

/**
* Returns the error code captured when the exception occurred. This can be fed to {@link CRT.awsErrorString} to
* Returns the error code captured when the exception occurred. This can be fed to CRT.awsErrorString() to
* get a user-friendly error string
* @return The error code associated with this exception
*/
int getErrorCode() {
public int getErrorCode() {
return errorCode;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ public void benchmarkS3Get() {
// resolution
final int vipsNeeded = (int) Math.ceil(expectedGbps / 0.5 / 10);
final int sampleDelay = Integer.parseInt(System.getProperty("aws.crt.s3.benchmark.warmup",
new Integer((int) Math.ceil(vipsNeeded / 5)).toString()));
Integer.toString((int) Math.ceil(vipsNeeded / 5))));
System.out.println(String.format("REGION=%s, WARMUP=%s", region, sampleDelay));

// Ignore stats during warm up time, they skew results
Expand Down Expand Up @@ -1402,7 +1402,7 @@ public void benchmarkS3Put() {
// resolution
final int vipsNeeded = (int) Math.ceil(expectedGbps / 0.5 / 10);
final int sampleDelay = Integer.parseInt(System.getProperty("aws.crt.s3.benchmark.warmup",
new Integer((int) Math.ceil(vipsNeeded / 5)).toString()));
Integer.toString((int) Math.ceil(vipsNeeded / 5))));
System.out.println(String.format("REGION=%s, WARMUP=%s", region, sampleDelay));

// Ignore stats during warm up time, they skew results
Expand Down

0 comments on commit 4fd525f

Please sign in to comment.