A replacement frame is the way to go if under warranty but a cracked frame isn't always a write off, @davidphilips offers some good advice up the thread, I had a very thin Titanium frame repaired because of a crack and rode it for a year before selling it.