1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

[sinttest] Improve TimeoutException's message of ResultSyncPoint

This commit is contained in:
Florian Schmaus 2024-05-21 12:50:19 +02:00
parent 2a5cf149b2
commit 34c2d5210e

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2015 Florian Schmaus
* Copyright 2015-2024 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -50,7 +50,12 @@ public class ResultSyncPoint<R, E extends Exception> {
if (exception != null) {
throw exception;
}
throw new TimeoutException(timeoutMessage == null ? "Timeout expired" : timeoutMessage);
String message = "Timeout after " + timeout + "ms";
if (timeoutMessage != null) {
message += ": " + timeoutMessage;
}
throw new TimeoutException(message);
}