You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Afremov (JIRA)" <ji...@apache.org> on 2006/12/04 18:30:22 UTC

[jira] Updated: (HARMONY-2382) [DRLVM][exceptions] Fix reported stack for exceptions in object constructor.

     [ http://issues.apache.org/jira/browse/HARMONY-2382?page=all ]

Pavel Afremov updated HARMONY-2382:
-----------------------------------

    Patch Info: [Patch Available]

> [DRLVM][exceptions] Fix reported stack for exceptions in object constructor.
> ----------------------------------------------------------------------------
>
>                 Key: HARMONY-2382
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2382
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: Fix-reported-stack-for-exceptions-in-object-constructor.txt
>
>
> The following java code throws exception with incorrect stack.
> Generated stack trace doesn't contains constructor in which exception is thrown.
> class ExceptionStackTest {
>     private static final int MAX_DEPTH = 1000;
>     // Constructor calls itself and throw runtime exception on max depth
>     ExceptionStackTest(int c) {
>         if (c > 0) {
>             new ExceptionStackTest(c - 1);
>         } else {
>             throw new RuntimeException("Test");
>         }
>     }
>     // run test and check that it throws exception with right stack depth
>     public static void main(String[] args) {
>         new ExceptionStackTest(MAX_DEPTH);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira