When a drug candidate runs into toxicity trouble, the first question that comes to everyone's mind in the lab is: mechanism-based or not? If the project is a follow-on compound to something that's already made it to the market, the answer is probably already clear - after all, if the first one was clean, why shouldn't the second one be?
But if you're working on a new target, this is a major headache, with major implications either way. If the tox is related to the compound's mechanism of action, you're probably going to have to abandon the compound, and perhaps abandon any hope of a follow-up while you're at it. A really solid link to trouble can kill a target for you and for everyone else in the industry. That sound like bad news, and in the short run it probably is - but in the long run, it's better to know these things. There are enough things to waste time on already, so getting rid of one isn't such a catastrophe, unless it's your own drug.
On the other hand, if the toxicity isn't mechanism-based, then it's likely due to something odd about the particular compound, some off-target effect that it has. Chasing these things down can be extremely difficult, and often there's no way to really tell what went wrong. You just have to move along another compound, from a different structural series if possible, and hold your breath. At least you know what to look for first. But there's always the horrible possibility that the follow-up compound will show an equally ugly but completely different tox profile, which brings on thoughts of truck-driving school, where you at least would know what the hell is going on.
Of course, the usual reservations apply here (toxicology is full of these). For example, it's always possible that the compound is toxic in one species, but not in another. Happens all the time, actually. But in that case, you'd better have a really, really plausible reason why humans are on the safe side of the line, and convincing ones can be hard to find. Maybe all the problems are caused by a metabolite, and not by the original drug (that one's far from unknown, too). Back to the lab you'll go for that one, too, because you don't know how human will react to the metabolite, and you can't be quite sure how much of it they'll produce relative to the animals, anyway.
Barring these, though, either the compound is dead, or the whole structural class of compounds is dead along with it, or the whole universe of compounds that work the same way is dead. None of those are necessarily appealing, but those are the main choices, and there's nothing written down - anywhere - that says that you have to get one that you like.