Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1242074

fp.bugs 4018 jdb always catches some exceptions

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.5

      Description

       
      From: Jean-Paul Buu-Sao <###@###.###>
      This does not look like form output to me.


      1. OS
      WinNT 3.51

      2. VERSION
      JDK 1.0

      3. DESCRIPTION
      Some exceptions are always caught by the debugger even though an
      handler exist.

      4. STEPS TO REPRODUCE

      Given test18.java:

          class myException extends Exception
          {
          }

          public class test18
          {
            public static void main( String args[] )
            {
              String one = "one";
              int i = -1;
          
              try
              {
                if( i == -1 )
                  throw new myException();
              }
              catch( Exception e )
              {
                System.out.println( e );
              }
              try
              {
                i = Integer.parseInt( one );
              }
              catch( Exception e )
              {
              }
              System.out.println( "one:" + i );
            }
          }

      Session log:

      jdb test18
      Initializing jdb...
      0x1045530:class(test18)
      > run
      run test18
      running ...
      main[1] myException <<<CORRECT: JDB DOESN'T CATCH IT

      Uncaught exception: java.lang.NumberFormatException one
              at java.lang.Integer.parseInt(Integer.java:147)
              at java.lang.Integer.parseInt(Integer.java:167)
              at test18.main(test18.java:23)
              at sun.tools.debug.MainThread.run(Agent.java:50)
      <<< INCORRECT: JDB CAUGHT NumberFormatException

      main[1] exit

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tballsunw Tom Ball (Inactive)
              Reporter:
              bhagen Benjamin Hagen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: