| Summary: | Setting exception record's message field gets various Java compile errors | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Kathy Carroll <carrollk> |
| Component: | EDT | Assignee: | Matt Heitz <mheitz> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mheitz |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | 354957 | ||
| Bug Blocks: | |||
I was going to try fixing this today before anybody noticed the problem, but you beat me to it. I've changed AnyExceptionTypeTemplate to fix the initial value of an exception. There's still more work to do before all of this is fixed. FYI, the line "oopsy.message = info;" will result in a NullValueException. The exception "oopsy" declared in the previous line is null. Add {} to the declaration.
I changed RecordTemplate to properly generate assignments between two records that are references, such as exceptions. Bug 354957 must be fixed before your testcase will generate cleanly. verified Closing this defect. |
Setting exception record's message field gets various Java compile errors package explore; library LogResults {} function assertTrue(info string, flag boolean) if (flag) syslib.writeStdOut("all good"); else syslib.writeStdOut("going to throw the exception"); throw new AssertionFailedException{message = info}; end end function assertTrue2(info string, flag boolean) local string = "loc " + info; if (flag) syslib.writeStdOut("all good"); else syslib.writeStdOut("going to throw the exception"); oopsy AssertionFailedException; oopsy.message = info; throw oopsy; end end end Record AssertionFailedException type Exception end