Just for the sake of clarity, both responses above are correct but it appears as though each should be used in the context given and are not interchangeable (at least from what I could determine from some hasty testing). Use
$@ when testing the result of the constructor method and $ftp->code, $ftp->message when checking the other methods. Please let me know if there are further exceptions.
This thread was informative for me since when I checked to see how I had handled this in my programs, I found that I had neglected to test the result of the constructor method call (tested everything else though). Thanks!
--Jim