Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] LTW fail hard/fast options (for testing)

I have now found static/inner IMessageHandler IMessageHandler.THROW,
which seems to be on the right track and what I need.  Do I need to
reproduce this in my test code, or could we promote the THROW instance
to a public class?

Thanks
Brett

On Sun, Oct 23, 2011 at 2:54 PM, Brett Randall <javabrett@xxxxxxxxx> wrote:
> Hi,
>
> When unit testing aspects and advised test/tested code (as opposed to
> deploy/runtime, where this option wouldn't make sense), it would be
> nice to be able to instruct the weaver to throw some sort of unchecked
> Exception or Error if there are configuration problems with error
> severity or higher.  Does such an option exist - I couldn't see it in
> the LTW weaver options?
>
> This would allow unit tests to fail-fast in the case of a LTW
> configuration error, and could help clarify the cause of the failure.
> Some pre-existing unit tests I'm currently working with picked up some
> weaving issues during development e.g. a typo in a pointcut, and the
> program continues to execute, and to establish the cause of the unit
> test fail you need to read the weaver verbose console messages to find
> the problem, whereas an exception would be clearer.
>
> Has anything like this ever been considered - would it be feasible and
> worthwhile?
>
> Thanks
> Brett
>


Back to the top