set error code in constructor since newer versions of PHP make $code attribute protected; fix rel namespace per recent API change