[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] using AspectJ to deal with exceptions

I have the following statement:
socket = new ServerSocket(port).
if java.net.BindException is thrown then then the port is already in which case I wish to increment the port number and try again. I wish to keep this up until either I get a free port or we run out of ports.
Can aspectj make this algorithm any easier/elegant to implement than Java?
Eric Macaulay