question regarding CONNECT BY

I need to check which code is causing a loop between parent and child. In 10G I could use CONNECT_BY_ISCYCLE, but it is not available in 9i; so what I did was the following (if there's a better solution please let me know).

parent_id | child_id 111 | 777 777 | 111

this should cause a loop and I should be able to tell the user that code 111 or 777 (either) is causing the problem.

If there's a loop (the exception code is -1436), then I get the code and return it to the client.