Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354764

Summary: JS: Expecting InvalidIndexException using substring [: operator
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: greer
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-08-15 15:10:45 EDT
If I remove the onExcpetion block for InvalidIndexException the code will execute. Handler terminates with exception included.  

 try
    longStr String = "123456789";    
    shortStr String = longStr[8:12];           
  onException (oops InvalidIndexException)
     SysLib.writeStdOut("Success");
  onException (oops AnyException)
     SysLib.writeStdOut("wrong exception");
  end

Java had this issue as well 354259.
Comment 1 Scott Greer CLA 2011-09-10 15:20:27 EDT
Ported Java RT implementation of EString.substring; unit-tested with the provided testcase.
Comment 2 Kathy Carroll CLA 2011-09-12 10:40:55 EDT
Verified with 201109120910
Comment 3 Kathy Carroll CLA 2011-09-19 15:27:37 EDT
Verified with 201109120910
Comment 4 Lisa Lasher CLA 2011-10-11 16:27:07 EDT
Closing this defect.