It means damn, but so that it isn't a curse word, that way in a non-formal way, you can say damn, in which would be acceptable.
Darn, I did it again.