From RTSC-Pedia

Jump to: navigation, search
revision tip
—— LANDSCAPE orientation
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC

XDCscript - Module-Object.$logWarning

Log a warning from this module

Contents

Synopsis

 
«Mod».$logWarning(«msg», «obj»[, «prop»])

where «Mod» is the module from which the warning is sourced.

Parameters

«msg» 
the string explaining the warning
«obj» 
the typed object that is associated with the warning
«prop» 
(optionally specified) property of «obj» that is associated with the warning

Description

A special method that "logs" a warning from the module «mod» with message «msg» associated with the typed object «obj». The optional argument, «prop», must be a property of «obj» and allows the module to specifically identify a configuration parameter associated with the warning.

Control returns to the caller of $logWarning so that multiple warnings can be logged. Warnings logged during the configuration validation phase (or earlier) do not prevent the generation phase from starting. Warnings logged at any time during configuration have no effect on the exit status.

Warning messages resulting from $logWarning have the following format:

 
warning: «Mod»: "«file»", line «num»: «obj» «prop»: «msg»

where «file» and «line» are the file and line number where the call to $logWarning occurred.

Example

Mod.xs
 
 
 
if (!("ti.mcu.msp430.csl.watchdog" in xdc.om)) {
    this.$logWarning("Watchdog timer has not been initialized.", this);
}

In the event that the warning above is triggered, a warning message similar to the following will be emitted.

 
warning: Mod: "Mod.xs", line 8: Mod: Watchdog timer has not been initialized.

See also

XDCscript - Module-Body.module$validate Validate current domain object model
XDCscript - Module-Object.$logFatal Throw fatal exception from this module
XDCscript - Module-Object.$logError Log an error from this module
[printable version]  [offline version]offline version generated on 04-Aug-2010 21:08 UTC
Copyright © 2008 The Eclipse Foundation. All Rights Reserved


Views
Personal tools
package reference