From RTSC-Pedia
[printable version] [offline version] | offline version generated on 04-Aug-2010 21:08 UTC |
XDCscript - Module-Object.$logFatal
Throw fatal exception from this module
Contents |
Synopsis
| «Mod».$logFatal(«msg», «obj»[, «prop»]) |
where «Mod» is the module from which the fatal exception is sourced.
Parameters
- «msg»
- the string explaining the exception
- «obj»
- the typed object that is associated with the exception
- «prop»
- (optionally specified) property of «obj» that is associated with the exception
Description
A special method that throws an exception 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 exception.
Control does not return to the caller of $logFatal so no further cleanup is possible within the module. Exceptions thrown at any time during configuration cause the configuration step to terminate with a non-zero exit status.
Messages resulting from $logFatal have the following format:
| error: «Mod»: "«file»", line «num»: «obj» «prop»: «msg» |
where «file» and «line» are the file and line number where the call to $logFatal occurred.
Example
Mod.xs | |
| if (intNum < 4) { this.$logFatal("Can't remap interrupts 0-3", this); } |
In the event that the exception above is triggered, an error message similar to the following will be emitted.
| error: Mod: "Mod.xs", line 8: Mod : Can't remap interrupts 0-3 |
See also
XDCscript - Module-Body.module$validate | Validate current domain object model |
XDCscript - Module-Object.$logError | Log an error from this module |
XDCscript - Module-Object.$logWarning | Log a warning from this module |
[printable version] [offline version] | offline version generated on 04-Aug-2010 21:08 UTC |