512 |
|
} |
513 |
|
|
514 |
|
/** |
515 |
< |
* Returns a rethrowable exception for the given task, if |
516 |
< |
* available. To provide accurate stack traces, if the exception |
517 |
< |
* was not thrown by the current thread, we try to create a new |
518 |
< |
* exception of the same type as the one thrown, but with the |
519 |
< |
* recorded exception as its cause. If there is no such |
520 |
< |
* constructor, we instead try to use a no-arg constructor, |
521 |
< |
* followed by initCause, to the same effect. If none of these |
522 |
< |
* apply, or any fail due to other exceptions, we return the |
523 |
< |
* recorded exception, which is still correct, although it may |
524 |
< |
* contain a misleading stack trace. |
515 |
> |
* Returns a rethrowable exception for this task, if available. |
516 |
> |
* To provide accurate stack traces, if the exception was not |
517 |
> |
* thrown by the current thread, we try to create a new exception |
518 |
> |
* of the same type as the one thrown, but with the recorded |
519 |
> |
* exception as its cause. If there is no such constructor, we |
520 |
> |
* instead try to use a no-arg constructor, followed by initCause, |
521 |
> |
* to the same effect. If none of these apply, or any fail due to |
522 |
> |
* other exceptions, we return the recorded exception, which is |
523 |
> |
* still correct, although it may contain a misleading stack |
524 |
> |
* trace. |
525 |
|
* |
526 |
|
* @return the exception, or null if none |
527 |
|
*/ |