A standard checkpoint from QTP should be able to cover that for you.
EDIT: Looking at that post I seemed a little vague...
Ensure you have the "All Items" property of the Web Pages' status bar in the repository added, and then use a standard checkpoint on the statusbar on the All Items property. (It'll be a complex value containing Any Privacy messages, Status bar messages etc when you record the page as it works.) If a Java error occurs, it will be added to the run-time "all items" property of the displayed page and this will differ from your check point and the test will fail.