making error codes exceptions