mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
[sinttest] Improve TimeoutException's message of ResultSyncPoint
This commit is contained in:
parent
2a5cf149b2
commit
34c2d5210e
1 changed files with 7 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright 2015 Florian Schmaus
|
* Copyright 2015-2024 Florian Schmaus
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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) {
|
if (exception != null) {
|
||||||
throw exception;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue