Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354764 - JS: Expecting InvalidIndexException using substring [: operator
Summary: JS: Expecting InvalidIndexException using substring [: operator
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-15 15:10 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:16 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.