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

Bug 326826

Summary: logFatal doesn't work in meta functions
Product: [Technology] RTSC Reporter: Shreyas Prasad <shreyasp>
Component: PlatformsAssignee: Sasha Slijepcevic <sascha>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: d-russo
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Shreyas Prasad CLA 2010-10-01 20:48:31 EDT
Build Identifier: xdctools_3_20_05_69_eng

Are we allowed to call this.$logFatal() from a meta function? I’ve observed that doing so results in some strange output when hitting the logError from the meta function.

I have this in my meta function:


        this.$logFatal("The device (" + Program.cpu.deviceName + 
                       ") isn't supported by Notify", this);

 

And I get this when hitting this statement:

js: "Settings.xs", line 491: Error: xdc.fatal.error

instead of the error message.



Reproducible: Always

Steps to Reproduce:
See 'details' section
Comment 1 Sasha Slijepcevic CLA 2010-10-15 17:57:25 EDT
- fixed in xdc-w14
The cause of the bug was that a user's script was executing outside of a try-catch block in runStringCfg in xdc/cfg/Main.xs. That block was catching an error thrown by $logFatal, and then displaying previously accumulated errors and warnings.
Now, a user's script is inside the block. Previously, this was a problem for xgconf when xgconf invoked runStringCfg directly, without going through main(). Jon R. will check if such a problem still exists and try to solve it inside xgconf.
Comment 2 Dave Russo CLA 2011-11-09 18:55:44 EST
closing "ancient" resolved bugs