This is a convenience decorator to define a
after advice based on dcl.advise().
This is a shortcut function to define one
after advice. Logically it is defined as:
1 2 3 4 5
It means that instead of:
1 2 3
It is possible to write a shorter version:
This is a regular function. It is called with the same context as an advised method. It takes up to four parameters:
argumentsobject (a pseudo-array) used to call an advised method.
result- the returned value or a thrown exception object.
makeReturn(value)- the procedure, which can be called to supply a new returned value.
makeThrow(value)- the procedure, which can be called to emulate an exception. In this case
valueis assumed to be a valid exception value, e.g., an
makeThrow() can be called several times. The last value is used as the result.
The returned value of an after advice is ignored.
It is not recommended to modify parameters or a returned value inside
after advice. Use
makeThrow() for that. Or consider using
It is recommended to derive all exception objects from the standard
Error object, so erroneous and normal
result values would be easily distinguished.