Generally, yes, but it depends on the act, the failure and what we get out of it. If we do not learn from failure, then better to not have tried. If risk far out weighs reward, better to not have tried. And the act may be one that shouldn't be undertaken regardless of the outcome. If one fails at robbing a bank, then obviously it shouldn't have been tried. But even if one succeeds it is not something that should have been tried.