Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360251 - Need better messages for invalid date
Summary: Need better messages for invalid date
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-07 11:26 EDT by broy2 CLA
Modified: 2017-02-23 14:20 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description broy2 CLA 2011-10-07 11:26:32 EDT
try
myDate = "0000110300";
SysLib.writeStdout(myDate); 
onException(oops anyexception)
SysLib.writeStdout(oops.message);
end
try
myDate = "110300";
SysLib.writeStdout(myDate); 
onException(oops anyexception)
SysLib.writeStdout(oops.message);
end 

RBD gives messages:
EGL0102E The 0000110300 value of string type cannot be converted to the date type.
EGL0002I The error occurred in dateQuestions processing the main function.
EGL0102E The 110300 value of string type cannot be converted to the date type.
EGL0002I The error occurred in dateQuestions processing the main function. 

EDT gives:
MONTH
String index out of range: 6
Comment 1 Jeff Douglas CLA 2012-06-26 13:00:19 EDT
This is what is now being given as the exception message:

The value 0000110300 of type string cannot be converted to the type date.
The value 110300 of type string cannot be converted to the type date.
Comment 2 Matt Heitz CLA 2013-01-03 10:45:17 EST
Moving old fixed bugs from the RESOLVED state to CLOSED.