mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8274367: Re-indent stack-trace examples for Throwable.printStackTrace
Reviewed-by: mchung, iris, darcy, bpb
This commit is contained in:
parent
c4b52c7378
commit
c880b87a20
1 changed files with 21 additions and 21 deletions
|
@ -608,12 +608,12 @@ public class Throwable implements Serializable {
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* Exception in thread "main" java.lang.Exception: Something happened
|
* Exception in thread "main" java.lang.Exception: Something happened
|
||||||
* at Foo.bar(Foo.java:10)
|
* at Foo.bar(Foo.java:10)
|
||||||
* at Foo.main(Foo.java:5)
|
* at Foo.main(Foo.java:5)
|
||||||
* Suppressed: Resource$CloseFailException: Resource ID = 0
|
* Suppressed: Resource$CloseFailException: Resource ID = 0
|
||||||
* at Resource.close(Resource.java:26)
|
* at Resource.close(Resource.java:26)
|
||||||
* at Foo.bar(Foo.java:9)
|
* at Foo.bar(Foo.java:9)
|
||||||
* ... 1 more
|
* ... 1 more
|
||||||
* </pre>
|
* </pre>
|
||||||
* Note that the "... n more" notation is used on suppressed exceptions
|
* Note that the "... n more" notation is used on suppressed exceptions
|
||||||
* just as it is used on causes. Unlike causes, suppressed exceptions are
|
* just as it is used on causes. Unlike causes, suppressed exceptions are
|
||||||
|
@ -623,26 +623,26 @@ public class Throwable implements Serializable {
|
||||||
* exceptions:
|
* exceptions:
|
||||||
* <pre>
|
* <pre>
|
||||||
* Exception in thread "main" java.lang.Exception: Main block
|
* Exception in thread "main" java.lang.Exception: Main block
|
||||||
* at Foo3.main(Foo3.java:7)
|
* at Foo3.main(Foo3.java:7)
|
||||||
* Suppressed: Resource$CloseFailException: Resource ID = 2
|
* Suppressed: Resource$CloseFailException: Resource ID = 2
|
||||||
* at Resource.close(Resource.java:26)
|
* at Resource.close(Resource.java:26)
|
||||||
* at Foo3.main(Foo3.java:5)
|
* at Foo3.main(Foo3.java:5)
|
||||||
* Suppressed: Resource$CloseFailException: Resource ID = 1
|
* Suppressed: Resource$CloseFailException: Resource ID = 1
|
||||||
* at Resource.close(Resource.java:26)
|
* at Resource.close(Resource.java:26)
|
||||||
* at Foo3.main(Foo3.java:5)
|
* at Foo3.main(Foo3.java:5)
|
||||||
* Caused by: java.lang.Exception: I did it
|
* Caused by: java.lang.Exception: I did it
|
||||||
* at Foo3.main(Foo3.java:8)
|
* at Foo3.main(Foo3.java:8)
|
||||||
* </pre>
|
* </pre>
|
||||||
* Likewise, a suppressed exception can have a cause:
|
* Likewise, a suppressed exception can have a cause:
|
||||||
* <pre>
|
* <pre>
|
||||||
* Exception in thread "main" java.lang.Exception: Main block
|
* Exception in thread "main" java.lang.Exception: Main block
|
||||||
* at Foo4.main(Foo4.java:6)
|
* at Foo4.main(Foo4.java:6)
|
||||||
* Suppressed: Resource2$CloseFailException: Resource ID = 1
|
* Suppressed: Resource2$CloseFailException: Resource ID = 1
|
||||||
* at Resource2.close(Resource2.java:20)
|
* at Resource2.close(Resource2.java:20)
|
||||||
* at Foo4.main(Foo4.java:5)
|
* at Foo4.main(Foo4.java:5)
|
||||||
* Caused by: java.lang.Exception: Rats, you caught me
|
* Caused by: java.lang.Exception: Rats, you caught me
|
||||||
* at Resource2$CloseFailException.<init>(Resource2.java:45)
|
* at Resource2$CloseFailException.<init>(Resource2.java:45)
|
||||||
* ... 2 more
|
* ... 2 more
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public void printStackTrace() {
|
public void printStackTrace() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue