Use "HTTP_Exception::factory(404)" instead of "new HTTP_Exception_404"