Packageorg.spicefactory.parsley.messaging
Classpublic class MessageError
InheritanceMessageError Inheritance Object

API for configuring methods that should handle errors that were thrown by a regular message target.



Public Methods
 MethodDefined By
  
Applies this configuration to the specified definition builder.
MessageError
  
Sets the type of the error that this handler is interested in.
MessageError
  
forMethod(method:String):MessageError
[static] Creates a new builder for a message error handler.
MessageError
  
order(value:int):MessageError
Sets the execution order for this error handler.
MessageError
  
scope(name:String):MessageError
Sets the name of the scope this error handler should be applied to.
MessageError
  
Sets an optional selector value to be used in addition to selecting messages by type.
MessageError
  
type(value:Class):MessageError
Sets the type of the messages the error handler wants to handle.
MessageError
Method Detail
apply()method
public function apply(builder:ObjectDefinitionBuilder):void

Applies this configuration to the specified definition builder.

Parameters

builder:ObjectDefinitionBuilder — the builder to apply this configuration to

errorType()method 
public function errorType(type:Class):MessageError

Sets the type of the error that this handler is interested in. The default is the top level Error class.

Parameters

type:Class — the type of the error that this handler is interested in

Returns
MessageError — this builder instance for method chaining
forMethod()method 
public static function forMethod(method:String):MessageError

Creates a new builder for a message error handler.

Parameters

method:String — the name of the target method to invoke in case of errors

Returns
MessageError — a new builder for a message error handler
order()method 
public function order(value:int):MessageError

Sets the execution order for this error handler. Will be processed in ascending order. The default is int.MAX_VALUE.

Parameters

value:int — the execution order for this error handler

Returns
MessageError — this builder instance for method chaining
scope()method 
public function scope(name:String):MessageError

Sets the name of the scope this error handler should be applied to.

Parameters

name:String — the name of the scope this error handler should be applied to

Returns
MessageError — this builder instance for method chaining
selector()method 
public function selector(value:*):MessageError

Sets an optional selector value to be used in addition to selecting messages by type.

Parameters

value:* — an optional selector value to be used in addition to selecting messages by type

Returns
MessageError — this builder instance for method chaining
type()method 
public function type(value:Class):MessageError

Sets the type of the messages the error handler wants to handle.

Parameters

value:Class — the type of the messages the error handler wants to handle

Returns
MessageError — this builder instance for method chaining