Ignore errors in a proxied task.
Task package: | org.schmant.task.base |
Java package: | org.schmant.task.proxy |
Category: | Meta tasks |
Since: | 0.5 |
EntityFS-aware? | Yes* |
Implements: | ActionTaskFactory GeneratorTaskFactory ProcessTaskFactory |
Produces: | The generated object of the proxied task, if that task generates one. |
See also: | RecursiveActionTF |
Description:
Ignore errors in a proxied task. This can be used if errors in the proxied task should not be fatal.
Ignored errors are still logged.
This task factory implements ProcessTaskFactory
so that it can
be used by a RecursiveActionTF or a RecursiveProcessTF.
Required properties
Properties
errorsFatal | top |
If the proxied task throws an java.lang.Error
,
should that be considered to be fatal? I.e: should this task fail?
- Setter method:
setErrorsFatal(boolean b)
parameters:b
– Should ajava.lang.Error
be considered a fatal error?- Default value:
true
(errors are fatal)
logFooter | top |
The message that is logged to info
level
after the task has been successfully run.
- Setter method:
setLogFooter(String s)
parameters:s
– The footer message.- Default value:
- Empty (no footer message is logged.)
- See also:
- logHeader
logHeader | top |
The message that is logged to info
level
before the task is run.
- Setter method:
setLogHeader(String s)
parameters:s
– The header message.- Default value:
- A task class specific message.
- See also:
- logFooter
reportLevel | top |
This property is used to change the Report level for all task created by this task factory. The report level is changed for the thread running the task when the it is run, and is restored to its previous level when the it is done.
- Setter method:
setReportLevel(Level l)
Set the report levelparameters:l
– The new report level.
taskFactory (required) | top |
Task factory for creating proxied tasks.
- Setter method:
setTaskFactory(TaskFactory<?, ?> f)
parameters:f
– A task factory.
traceLogging | top |
If trace logging is enabled for a task, it reports its configuration before it is run.
Trace logging may also be enabled globally for all tasks by calling TraceMode.setTraceMode(boolean).
- Setter method:
setTraceLogging(boolean b)
Enable or disable trace logging.parameters:b
– Enable trace logging?
Examples
Example 1
Copy all Java source files in the src
directory hierarchy to the flat_src
catalog. Wrap the task in an
ErrorIgnoringTask
to ignore errors that can occur if there are
several files with the same name.
JavaScript
* An EntityFS-aware task is implemented using EntityFS. This means that it uses the filter settings of DirectoryView:s and also that it often can work with other file system implementations than File-based, such as the RAM file system.