GrinderContext class

A GrinderContext is used to give the currently running Grinder task the ability to introspect the running state. It can get the current Grinder instance and get a reference to the current GrinderTask instance (as well as the previous and next tasks, if any).

A GrinderContext also allows you to log messages and errors.

Constructors

GrinderContext(Grinder grinder, GrinderTask task, TaskInvocation invocation)

Properties

grinder Grinder
The Grinder instance.
final
invocation TaskInvocation
The current TaskInvocation.
final
task GrinderTask
The current running GrinderTask.
final
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

fail(String message) → void
Halt task execution; throws an exception with the given error message.
log(String message) → void
Log an informational message to Grinder's output.
toString() → String
Returns a string representation of this object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited