9.5.3 Error Configuration
KineticFusion contains over 130 different configurable semantic warnings that can be individually configured by the user, as well additional errors that are considered fatal. The settings for these warnings are stored in a user-editable configuration file called ErrorConfiguration.properties in the KineticFusion installation 'config' folder.
There are three different error levels used for Kineticfusion warning. Classes on the user class path will have all warning and error messages logged. Classes on the system class path will only have Fatal errors (those designated as Fatal at the top of the ErrorConfiguration.properties file) reported as these are errors from which KineticFusion cannot safely resolve the reported statement.
The three warning levels are:
- Error - Causes the application to abort processing
- Warning - Logs a warning message to the output and continues processing
- Ignore - The message is ignored
KineticFusion ships with a default message configuration defining all non-critical messages as Warning level messages. Without further configuration, KineticFusion will always perform a detailed analysis of all user ActionScript classes and scripts. On first use, the number of messages produced may appear overwhelming to a developer, however this behavior can be easily modified using both class metadata (see Metadata Support for more information) and by modifying the error levels associated with individual messages.
During semantic analysis, when an error message is logged, the error numbers are always printed alongside the message on output to enable a developer to easily identify the message associated with the error.
Each error message produced by the ActionScript compiler has an associated error ID which is an integer between 1000 and 6000. The following Error ID ranges are used:
- 1000-2000: General semantic warning messages
- 2000-3000: Static class analysis messages
- 3000-4000: Symbol resolution warning messages
- 4000-5000: Parser warning messages
- 5000-6000: Metadata specification warning messages
The warning level of messages except those generated by the parser (in the range 4000-5000) can be modified by the user.
In order to change the behavior of the compiler, KineticFusion uses a configuration file called ErrorConfiguration.properties. The default file is found is in the installation 'config' directory, but the KineticFusion application will attempt to locate the ErrorConfiguration.properties file in the same manner as the KineticFusion.properties file.
Users can modify the severity of all messages with the exception of those listed at the top of the default file representing critical errors. Attempting to lower the severity of a critical error will generate an application warning message and the new warning level will be ignored.
Each message in represented in the configuration file in the form:
# Sample Error text - this is optional and for informational purposes only
actionscript.error.<Error Number>=<Error level>
For example, the error found when passing in an unsupported type into a function is:
# 1011 : Illegal argument type (<CLASS ID>) used with <fnName>() function
Modifying a single error message level affects all classes, so should only be done when the developer is confident that the warning poses no problem in all contexts e.g. the passing of untyped arguments into a method with a typed argument list. All changes to the ErrorConfiguration.properties file will be processed immediately by the KineticFusion application.
The ErrorConfiguration.properties, in conjunction with class metadata defined within class files can be used to implement an enterprise-wide standard for ActionScript coding. In-house standards can be enforced by ensuring that classes of warnings are permanently flagged as errors.
All non-critical errors (those not identified at the head of the default ErrorConfiguration.properties file) are ignored when compiling any class found on the System class path. This class path is for all libraries that are known to be working and consistent
Copyright 2003-2005 Kinesis Software. All rights reserved.