This, I believe, is specific for when the route is of type sfDoctrineRoute.
On row 109 sfObjectRoute checks if the object returned by getObjectForParameters is_null before throwing a sfError404Exception:
109. if (is_null($this->object = $this->getObjectForParameters($this->parameters)) && (!isset($this->options['allow_empty']) || !$this->options['allow_empty']))
110. {
111. throw new sfError404Exception(sprintf('Unable to find the %s object with the following parameters "%s").', $this->options['model'], str_replace("\n", '', var_export($this->filterParameters($this->parameters), true))));
112. }
However, getObjectForParameters in sfDoctrineRoute returns false if it fails to retrieve a object and, thus, the check on row 109 won't function as it takes a null value to signify a failed retrieval.
This is what the check on row 109 should look like if it is to work as expected for sfDoctrineRoute:
109. if (!($this->object = $this->getObjectForParameters($this->parameters)) && (!isset($this->options['allow_empty']) || !$this->options['allow_empty']))