Создайте базовый класс, из которого вы расширяете все остальные классы, поместите туда обработчик ошибок.Например: FaultHandlerCairngormCommand расширяет SequenceCommand и реализует IResponder
[BaseCommand.as]
public class BaseCommand extends SequenceCommand implements IResponder
{
public function execute( event:CairngormEvent ):void
{
super.execute(event);
}
public function fault( info:Object ):void
{
throw new Error("Generic request failure"); //or handle as you please
}
public function result(data:Object):void
{
throw new Error("The result method implementation defined in IResponder for all extensions of BaseCommand must be overrriden in any sub-class");
}
}
[MyCommand.as]
// -- no need to implement onFault in sub-class
public class MyCommand extends BaseCommand
{
public function execute( event:Event ):void
{
remoteObjectDelegate.doYourServerOperation(this);
}
override public function result(data:Object):void
{
trace("happily handling the data"); //without this override an error will be thrown so the developer will know to correct
}
}